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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
W33628
Frequent Visitor

RLS based on multiple columns

I have a mapping table that maps Users  to the IDs that they have access to in my report. I then join this table to my main table in Power BI and then set up a role for my Row Level Security. This works great.

 

But now I need the security based on the possiblity of that ID in multiple columns on each row. For example if any of the 3 ID fields is 567, the person with access to that ID can see all of those rows. So basically it needs to be if ID=567 or ID2=567 or ID3=567. However, in Power BI I can only join my mapping table on 1 column. Is there a way to do this?

 

Example of Mapping Table

User                        ID

[email protected]567
[email protected]789

 

Example of Data Table

Sales     ID     ID2   ID3

50 567789
100567  
1000789567 
5 REPLIES 5
SathyaG35
Frequent Visitor

I am having the same trouble. Any solutions on this?

TeigeGao
Solution Sage
Solution Sage

Hi @W33628 ,

In your scenario, we cna use lookupvalue function to get ID from the first table, then use or function to filter the data.

Best Regards,

Teige

Hi, 

 

I noticed you posted this answer can you please post any example code on how to handle it?

@TeigeGao 

 

Where would I put that function? Would it be built into the Role I have defined? Can you provide an example?

Hi All,

 

I also need solution for this. Can anyone help us ?

 

Regards,

Shiva

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors