Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
cro1fni
Frequent Visitor

Multiple Roles in RLS

Hello Power BI Community,

 

I am trying to use RLS and assign multiple roles to individuals. This is one of the first times I have dealt with RLS, so I may have bitten off more than I can chew. 

I am working with the following model:

cro1fni_0-1640113069578.png

I have 3 roles to assign to each user: ADM, POSregion, SABPmanager

1. ADM: For the logged in user, use USERPRINCIPALNAME() and filter the "api robin_account teams." The user should see accounts that they are listed as a member of.

2. POSregion: For the logged in user, use USERPRINCIPALNAME() and filter the "POS Profile" table to only show regions that the user has rights to according to the "POS User Profile" table

3. SABPmanager: For the logged in user, filter the "SABP User Profile" table. The goal is to show accounts in the "api robin_account teams" for which the user is the supervisor of the "Account Development Manager." This is another field is the api table that indicates the member type of the user for an account.

 

The ADM roles works just fine by itself if I create a two-way security filter. However, when I assign an individual to 2 roles, the two-way filter does not work. The end goal is to show the user accounts that they are a direct member of, OR they are the supervisor of the account development manager for the account. 

 

Is it possible to do some sort of OR statement on a table for a RLS role? Any other suggestions on reorganization of tables, or DAX to achieve this would be greatly appreciated. I've provided screenshots below of the current RLS DAX I have for these roles.

cro1fni_1-1640113943080.pngcro1fni_2-1640113967430.pngcro1fni_3-1640113994538.png

 

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @cro1fni 

 

Please refer to the following similar posts, hope it will help you.

https://community.powerbi.com/t5/Desktop/Row-level-security-and-bidirectional-cross-filtering/m-p/81...

https://community.powerbi.com/t5/Service/One-person-in-multiple-roles-RLS/m-p/1888260 

https://community.powerbi.com/t5/Service/RLS-with-Multiple-Roles/m-p/709690 

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@cro1fni , for OR you need to have more than one role.

So if role one give access state 1

and role 2 give access to item 1

 

and give both roles then it State1 Or Item 1

 

In a single role, multiple filter are AND

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.