Forum Discussion
Avoid RLS to show some measures
- 4 years ago
hi im really sorry to bother.
i been struggling to implement 2 functionality.
Both are RLS related.
1 . As i been above.
2. i dont want to add every single email addres in power bi service to give permission.
user table:
ID emailaddress admin
I need to implement RLS,we have 1000s of user and every user need to see the data which user name is connected to fact table but some user(lets say admin) need to see all the users data.
if i need to make group per user, i can make it but just need to know. how every thing is connected.
i been using USERPRINCIPALNAME () in manage roles.
Thanks in advance.
Hey bideveloper555 ,
Sent along the message in our private conversation, but for those who might find this thread later on here's what I shared as to how to get this working in this particular situation:
I walked through this and all you really need to do is have 2 fact tables.
1 with RLS on it and 1 without RLS on it.
Usually, the USER is something like a UPN that you might enforce the RLS on so whenever someone logs in they would just see their own information in the table visual and then the name card comes from the FACT table without RLS.
Here's a dummy report I built to show how it works, you'd need to go into the modeling tab and view as to see the RLS in action.
Let me know if you have any questions.
https://drive.google.com/file/d/1pDzwjo8EBr9FB6QL9wCFjTLREFkvvw5N/view?usp=sharing
hi, model which you built was working perfectly but i cant set up RLS on Fact table but i need to set up on user table.
https://drive.google.com/file/d/1JEz0ZaL5qzXI8Ht9coGLrdRFHGCbeGSH/view
i am attaching the sample model.