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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic RLS for multiple columns

Hello there!

 

I would like to ask you, how to apply Dynamic row-level security for 2 columns at the same time?

I have 3 data tables:

Table Sales

OwnerManagerSalesYear
Albert WehrCody Lem1502020
Bernard GrippMixael Crol130,222020
Mixael CrolTommy Teller562020

 

Table Owner

OwnerUsername
Albert Wehralbert.wehr
Bernard Grippbernard.gripp
Mixael Crolmixael.crol

 

Table Manager

ManagerUsername
Cody Lemcody.lem
Mixael Crolmixael.crol
Tommy Tellertommy.teller

 

So users can see all rows in dataset Sales, where they are owners or managers. I created working DRLS for managers, but for owners it did not work, even though I did it the same way. 

 

Could you, please, advice me, how to make the DRLS for both columns? Maybe there is easier solution I don't know

 

Thank you in advance!

8 REPLIES 8
jdbuchanan71
Super User
Super User

My sample file behaves the way you want it to though correct?

jdbuchanan71
Super User
Super User

Sorry, I didn't see that the same person can be an owner or a manager.  In that case moving the manager as a new column in the owner table is your best bet.

jdbuchanan71_1-1646068312018.png

jdbuchanan71_2-1646068320056.png

I have attached my sample file for you to look at.

 

Anonymous
Not applicable

Hello @jdbuchanan71 , sorry for late response, unfortunately, did not help 😞 I still can see only rows where user is a manager 😞

jdbuchanan71
Super User
Super User

You tried making a second role?  You would assign the owners to one role and the managers to the other role and each role would only filter the one table it is related to.

Anonymous
Not applicable

I have made 2 roles: Manager and Owner. I filtered table Manager and Owner [Username] = USERNAME(), and made for both 2 roles filter in Sales = RELATED('Manager/Owner'[Manager/Owner])

jdbuchanan71
Super User
Super User

@Anonymous 

You would either need to make two roles, one for owners and one for managers so you could apply the filters separately or you could move the manager field to the owners table then use something like.

 

 

 

VAR _UPN = USERPRINCIPALNAME()
RETURN 
Owners[Owner] = _UPN || Owners[Manager] = _UPN

 

 

 

Right now I assume you added the Owners filter to an existing role that also filters the Managers.  No row in your sales table will have the same user for both the owner and the manager fields and RLS filters combine to only show the rows allowed.  I you are getting no results when the RLS is applied yes?

Anonymous
Not applicable

Well it didn't work unfortunately, tried to apply it for my dataset 😞

Anonymous
Not applicable

Well if I apply both 2 RLS, it works only for manager. Users will be given both 2 profiles: managers and owners, but can see only rows with their names. I will try your solution 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.