Forum Discussion
RLS: Users with multiple roles filter problem
Hi all,
I have a model with Companies and Departments. My requirement is to create RLS for both Companies and Departments and assign them to users. Some users need to have both roles appliead at the same time, ie, they are not allowed to see the entire Company, but their department only.
While I can apply multiple roles to a user, the data displayed is not the intersection of these roles. What I can see is the addition of the roles.
As an example, a user with RLS: Company A + Department B will see all Company A + Department B for all companies, which is not what I need.
Is there a way to apply both roles restrictevly?
Thanks
8 Replies
- v-alq-msftCommunity Support
Hi, JVidal
Basedon your description, I created data to reproduce your scenario.
Table:
If you create two roles as below, it won't display the intersection of two roles.
Result:
You need to put the rules in one role like below and then it will show the intersection of two rules.
Result:
Here is the pbix .
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- JVidalHelper I
Hi v-alq-msft
Thank you for taking the time to review and create the small example.
I was also considering your approach, but since I have 20+ Companies and around 10 Departments, I would like to avoid as much as possible to create roles for all different possibilities of Company+Department. Another issue is that your approach needs to be applied at the fact table, where I would like to apply them at the dimension tables so the filters of the report get also filtered with relevant information. Applying to the fact table would require me to enable bi-directional filters and I would like to avoid it.
Being able to assign multiple roles to users is very helpful at avoiding this situation, as it will avoid a lot of work and maintenance in the future.
Thank you
Kind regards,
- philidorNew Member
I have the same problem, and I'm trying to find the solution, let me know if you could solve it.
- parry2kSuper User
- patyhelenlFrequent Visitor
I have the exact same issue, I want the intersection of two groups. Did you found a solution?