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
unnijoy
Post Partisan
Post Partisan

Dynamic RLS with Multiple Dimension Table

I have a Fact tablw which contain the sales data. And i got 2 dimension table. one for country and other for Sr manager names. Now i create a new table for access list. its is shown below.

unnijoy_0-1664776304944.png

I need to create the RLS based on the above list. As we can see that for Alex Sr Manager is showing as "All". IF "All" is coming then he should be able to see all the SR Manager name. Same in the case of Glen. For him both Country and SR Manager is coming as "All". So he should be able to see all the country and all SR manager. How can i achive this.

 

I tried something like this below. But when it is coming to "ALL" its coming as blank.

var _Restriction =
CALCULATETABLE(
VALUES( Access_List[Country] ),
Access_List[Email ] = USERPRINCIPALNAME()
)
var _RLS_Rest =
SWITCH(
TRUE(),
_Restriction = "ALL", TRUE(),
[Country] = _Restriction, TRUE(),
FALSE()
)
Return
_RLS_Rest

2 REPLIES 2
amitchandak
Super User
Super User

@unnijoy , I Usually Create a table with All , Name union with Name, Name and the join with table to get names when all use

 

All Guy

Guy Guy

 

Once UI gets the merged table, I have a column with the name, and you do not have to handle all

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

hi @amitchandak , i am not able to understand the solution that you gave. can we fix the below with out creating multiple tables.

 

var _Restriction =
CALCULATETABLE(
VALUES( Access_List[Country] ),
Access_List[Email ] = USERPRINCIPALNAME()
)
var _RLS_Rest =
SWITCH(
TRUE(),
_Restriction = "ALL", TRUE(),
[Country] = _Restriction, TRUE(),
FALSE()
)
Return
_RLS_Rest

 

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.