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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
unnijoy
Post Prodigy
Post Prodigy

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors