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 should put this in the role instead:
VAR __UPN = USERPRINCIPALNAME ()
VAR __Table = FILTER ( Table, CONTAINSSTRING ( Table[MappedEmail], __UPN ) )
RETURN
NOT ISEMPTY ( __Table )