Forum Discussion
harshagraj
Post Partisan
4 years agoFilter out using USERPRINCIPALNAME()
Hello all, Please see the below data. When i publish the below view in the service if i login with "[email protected]" i dont want to see 1st record and If an user login with "[email protected]" we dont...
- 4 years ago
You can create an RLS role with the rule
[email] <> USERPRINCIPALNAME()Once you have created a role, anyone you want to view the report must be assigned to a role. This is the intended functionality and there isn't a way to avoid assigning roles if you want to use RLS.
See the documentation and prior discussion here:
https://community.powerbi.com/t5/Desktop/Row-Level-Security-All-Users/m-p/253154
amitchandak
Super User
4 years agoharshagraj , You can use USERPRINCIPALNAME only in a measure. I doubt you can use that in a column
harshagraj
Post Partisan
4 years agoAlso if i have to create a measure then how do i aggregate Name column?
If(???(Name)=USERPRINCIPALNAME(),1,0)
Kindly help.