I would like to filter data by USERPRINCIPALNAME() via RLS.
For in stance, in below table, when USERPRINCIPALNAME = 'firstname.lastname@example.org', it should show first 2 rows, which contains 'email@example.com'
I've created a role with a table filter, but it doesn't work. Any suggestions? Thanks
) = True()
Solved! Go to Solution.
@spagad6263 you should put this in the role instead:
VAR __UPN = USERPRINCIPALNAME () VAR __Table = FILTER ( Table, CONTAINSSTRING ( Table[MappedEmail], __UPN ) ) RETURN NOT ISEMPTY ( __Table )
Thanks for the reply. I've created below measure. Can you advise how I could link this to the role?
@spagad6263 you need to add a measure:
Measure = VAR __UPN = USERPRINCIPALNAME () RETURN CALCULATE ( COUNTROWS ( Table ), CONTAINSSTRING ( Table[MappedEmail], __UPN ) )
This doesn't quite work.
I tried below using roles editor. No syntax error, but not returning what I need. Any thoughts?
USERPRINCIPALNAME() IN fact_Contact[MappingEmailAddress]
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.