Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I have two tables in my direct query model :
USER :
user_mail | security |
tata@microsoft.com | 1 |
toto@microsoft.com | 0 |
FACTORY:
factory_name | user_mail | security |
Factory 1 | tata@microsoft.com | 0 |
Factory 1 | toto@microsoft.com | 0 |
Factory 2 | tata@microsoft.com | 1 |
Factory 2 | toto@microsoft.com | 1 |
The relationship between the two tables is on the user_mail
I need to create a role on the user table (or factory)
The DAX in the role seems to be something like that :
USER[user_mail] =USERPRINCIPALNAME()
&&
BITAND(FACTORY[security],USER [security]) =FACTORY[security]
That means i need to compare for each user connecting on the dataset the row security and give him or not access to see factory row.
I had tryed lot of dax formula with no success.
Thank you so much for your help.
best regards
Solved! Go to Solution.
if you stay in the user table you would have to use RELATEDTABLE. However you can create two separate rules.
in the User table:
[user_mail] =USERPRINCIPALNAME()
in the Factory table:
BITAND([security],RELATED(USER [security])) =[security]
if you stay in the user table you would have to use RELATEDTABLE. However you can create two separate rules.
in the User table:
[user_mail] =USERPRINCIPALNAME()
in the Factory table:
BITAND([security],RELATED(USER [security])) =[security]