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
montoyesco
Helper I
Helper I

LOOKUPVALUE overrides RLS

Hi,

I have two tables:

ContactOrigin:

Origin_Table.png

ContactDestiny:

Destiny_Table.png

 

Both tables are not related inside the model (even though they have the "Id Origin" in common). In Power BI, both tables have RLS applied on Company Id Origin and Company Id Destiny, respectively. So, when I apply RLS for the company with Id 80022233 (BBB Ltda), both tables are filtered and that's ok:

 

montoyesco_2-1593634277727.png

But what I need is the "Id Origin" field in Destiny Contact Table shows only values that belong to BBB Ltda in Contact Origin Table (in this case, "567890" doesn't belong to BBB Ltda in Origin Contact table). I tried to create a calculated column to solve this:

 
Id Origin Lookupvalue = LOOKUPVALUE( ContactOrigin[Id Origin]; ContactOrigin[Id Origin]; ContactDestiny[Id Origin] )

 

But the outcom is the same, which means that LOOKUPVALUE overrides the RLS security:

PBI_lookupvalue.png

Is there another way to solve this issue? This is what I expected to see:

PBI_lookupvalue_expected.png

Thanks!

4 REPLIES 4
lbendlin
Super User
Super User

If you don't have an active relationship how is RLS supposed to know that it needs to filter the other table?  In that case you need to apply the RLS rules to BOTH tables.

I put this case as simple as I can. In my real model, these two tables doesn't exists. In the real one, I have two tables which are filtered with RLS, but I need both unrelated. Maybe the following link will explain you this case better than me:

 

https://community.powerbi.com/t5/Desktop/Lookupvalue-override-RLS/td-p/579361

 

As I say, I just try to "simplified" the case. In the link above it's explained, but in essence, it is the same issue.

Answer is still the same. If the tables are unrelated then you need to apply the RLS rules twice, once for each table.

So.... Don't you have the answer to this problem?.... anyone else? please?

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 Fabric 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.