Forum Discussion
planbitionbi
5 years agoFrequent Visitor
Row level security with user email -> Multiple User ID with same e-mail to filter on
Hi all! I have succesfully implemented row level security using the guide: https://www.youtube.com/watch?v=Sge_g9hTXWE&feature=emb_logo&ab_channel=PragmaticWorks Now the only issue is that I...
- 5 years ago
Hi planbitionbi ,
Please refer to the following measure:
[ID] IN SELECTCOLUMNS ( FILTER ( Security_User_CustomerStructure, Security_User_CustomerStructure[PersonID] IN CALCULATETABLE ( VALUES ( Security_Users[PersonID] ), FILTER ( Security_Users, Security_Users[Email] = USERPRINCIPALNAME () ) ) ), "ID", [CustomerStructureID] )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
v-deddai1-msft
5 years agoCommunity Support
Hi planbitionbi ,
I suggest you use USERPRINCIPALNAME ( ) instead of USERNAME() and you can change the dax to :
[ID] IN SELECTCOLUMNS(
FILTER(
Security_User_CustomerStructure,
Security_User_CustomerStructure[PersonID] IN CALCULATETABLE(VALUES(Security_Users[PersonID]),FILTER(Security_Users,Security_Users[Email] = USERPRINCIPALNAME())),
"ID", [CustomerStructureID]
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai