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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
DataSaurus
Frequent Visitor

Dynamic RLS pulling rules from one table to apply to another

Hi All,

 

We need to filter based off of domains but the domains list needs to be able to update dynamically, showing content only for the domain the user is accessing the Power BI report from. 

 

There are three relevant tables, LocationDomainList and a table created using a DISTINCT Filter against the DomainList table, ClientDomains

 

The Location table holds some user data but also the domains. 

 

displaynameDomain
Joe Bloggs (ABC)www.abc.com
Jane Doe (NFC)www.nfc.com
Fred Willis (ABC)www.abc.com
Mara Wilson (Test)www.test.com
Lina Gonzalez (XYZ)www.xyz.com

 

The DomainList table determines what domains can access what dashboard.

 

DomainClientName
www.abc.comLetters Corp
www.xyz.comLetters Corp
www.test.comTest Corp
  
  

 

Using hardcoded domains (which won't work for this solution) I created a table called ClientDomains. This was to format the domains filter put against the Location table to mirror code that had worked when it was hardcoded;

 

[Domains] IN {
"www.abc.com",
"www.xyz.com"
}

 

Accordingly, the ClientDomains table looks like this;

 

ClientNameDomains
Letters Corp{"www.abc.com", "www.xyz.com"}
Test Corp{"www.test.com"}

 

I have tried using FILTER as below, which returns nothing but does not trigger a syntax error

 

FILTER(ALL ('ClientDomains'[ClientName]),
CONTAINSROW(
{
"Test Corp"
}, [Domains]
)

)

 

I've also tried using LOOKUPVALUE, SELECTEDVALUE, SELECTCOLUMNS and all of these generate syntax errors.

 

Ideally, if I can get Power BI to return the string I have created in the ClientDomains table and then parse that through the filter in RLS, it will work. IDK if I'm totally off base and need to use Concateanex to create those strings inside the RLS Table Filters.. Can someone please give me some pointers on this? 

1 REPLY 1
amitchandak
Super User
Super User

@DataSaurus , In the RLS filter, you cannot go across the table. You can filter on more than one table individually. Try to relate the access only to email in the table

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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