Forum Discussion
spagad6263
2 years agoPost Patron
How to filter table by USERPRINCIPALNAME()
Hi, I would like to filter data by USERPRINCIPALNAME() via RLS. For in stance, in below table, when USERPRINCIPALNAME = '[email protected]', it should show first 2 rows, which contains '[email protected]...
- 2 years ago
spagad6263 I don't use this new look, I don't like it at all. Switch to the DAX editor and past the code there.
parry2k
2 years agoSuper User
spagad6263 you need to add a measure:
Measure =
VAR __UPN = USERPRINCIPALNAME ()
RETURN
CALCULATE (
COUNTROWS ( Table ),
CONTAINSSTRING ( Table[MappedEmail], __UPN )
)spagad6263
2 years agoPost Patron
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]