Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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]
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |