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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Using RLS with Dynamic filter

I needed some help with the RLS in my model. 

 

Trying to set up RLS on my dimensions so that it gets filtered in to the transaction as well. But, i was 

 

I have 2 dimension table with Products and region info. I have the user information with the region name tied to it. 

Pbi07_0-1635303118235.png

Luis has responsibility of specific products and i need to show only the sales that Luis is tied from transactions 

Pbi07_1-1635303233439.png

 

Pbi07_2-1635303279281.png

 

How to set the RLS on the dimesniosn so that it is driven dynamically based on the user info. Luis is in EU region and i don't want to hardcode this in the RLS. How to model this dynamically? 

 

Pbix is https://drive.google.com/file/d/1yxPLYii4V_uIvKkTxk30wbvbl_hSNzqO/view?usp=sharing

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I updated your sample pbix file, please check whether that is what you want.

1. Create relationship between table Users and Products

yingyinr_0-1635497824244.png

2. Create a role for the table Users with the formula as below

[PrincipalName] =USERPRINCIPALNAME()

yingyinr_2-1635497932709.png

3. Test role

yingyinr_1-1635497882716.png

In addition, you can refer the content in the following links to get it.

Dynamic RLS setup in Power BI

Dynamic Row Level Security with Power BI Made Simple

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

I updated your sample pbix file, please check whether that is what you want.

1. Create relationship between table Users and Products

yingyinr_0-1635497824244.png

2. Create a role for the table Users with the formula as below

[PrincipalName] =USERPRINCIPALNAME()

yingyinr_2-1635497932709.png

3. Test role

yingyinr_1-1635497882716.png

In addition, you can refer the content in the following links to get it.

Dynamic RLS setup in Power BI

Dynamic Row Level Security with Power BI Made Simple

Best Regards

amitchandak
Super User
Super User

@Anonymous , Based on what I got

 

The first and the third table should join on the region.

And in you should create a role to filter the first table 

table1[email] = userprincipalname()

 

How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

 

 

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
Anonymous
Not applicable

Thanks @amitchandak 

 

If i join the user and the region that is going to be a many to many relation. 

Sorry if i didn't explain this properly. My intention is to drive this in such a way that if the user is assigned the Region in the AD ( which is the first table - User ) that should drive the region filter in the dimension also. 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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