Forum Discussion
spagad6263
Post Patron
2 years agoHow 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
Super User
2 years agospagad6263 you need to add a measure:
Measure =
VAR __UPN = USERPRINCIPALNAME ()
RETURN
CALCULATE (
COUNTROWS ( Table ),
CONTAINSSTRING ( Table[MappedEmail], __UPN )
)- spagad62632 years ago
Post 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]