I'm trying to create a Slice from a Company table where the "current user" is "Contact Owner" of one of the listed contacts under the Company. I've got a Formula which shows a proper Y/N value for each company but when viewing the Slice Data it remains Empty, I can't figure out what I'm doing wrong and have been struggling for days to get this right. My data tables relate as follows:
Table: Contacts
PK: Email (Type Email)
FK: Company (Type Text)
FK: Contact Owner (Type Email)
Table: Companies
PK: ID (Type Text)
RL: Related Contacts (Type List)
And the formula i've whipped up to attempt to create the company slice is as follows:
IN( USEREMAIL(),
SELECT(Contacts[Contact Owner],
ISNOTBLANK(INTERSECT(SPLIT(REF_ROWS(Contacts, Company), " , "),
SPLIT(SELECT(Employees[Related Contacts], [Email] = UserEmail()), " , "))), TRUE))
Your Help would be much appreciated.
Solved! Go to Solution.
If the [Clients] is a virtual Ref list to your "Clients" slice, you can still use IN(USEREMAIL(),[Clients][Contact Owner])
Try something like IN(USEREMAIL(),[Related Contacts][Email])
Hi Aleksi,
Thanks for your quick response. I just realised i made a mistake in my Table refferences.
My tables are as follows:
Table Parent: Contacts
Table Slice: Clients
PK: Email
FK: Company
FK: Contact Owner
Table Parent: Contacts
Table Slice: Employees
PK: Email
RL: Related Clients
Table: Company
PK: ID
RL: Clients
This makes the formula like this:
IN( USEREMAIL(),
SELECT(Clients[Contact Owner],
ISNOTBLANK(INTERSECT(SPLIT(REF_ROWS(Clients, Company), " , "),
SPLIT(SELECT(Employees[Related Clients], [Email] = UserEmail()), " , "))), TRUE))
Now when previewing the data of the slice it shows me the companies where i am responsible so it appears to work. But when i'm creating a list view related to the slice it remains empty.
I'm probably over complicating my formula and thinking it might be more practicle to create a virtual column list with (unique) contact owners related to the companies client list but had no luck there so far as well.
If the [Clients] is a virtual Ref list to your "Clients" slice, you can still use IN(USEREMAIL(),[Clients][Contact Owner])
Thanks!
This solved my issue.
I guess I need to familiarise myself with when to apply a period between the variables and when not.
Kind regards,
Ruud
You can only use the formula without the dot when you have a VC ref list. It's meant to read the column from a child table.
User | Count |
---|---|
41 | |
36 | |
28 | |
23 | |
16 |