Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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, Location, DomainList and a table created using a DISTINCT Filter against the DomainList table, ClientDomains
The Location table holds some user data but also the domains.
displayname | Domain |
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.
Domain | ClientName |
www.abc.com | Letters Corp |
www.xyz.com | Letters Corp |
www.test.com | Test 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;
ClientName | Domains |
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?
@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
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |