Forum Discussion

cro1fni's avatar
cro1fni
Frequent Visitor
4 years ago

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:

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.

 

2 Replies