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! Learn more

Reply
Anonymous
Not applicable

Dynamic Filter in the RLS

Needed some help with this RLS filtering 

 

My table has the user emails along with Divisions that each user can view the data 

 

LocationemailDivision 1Division 2 Division 3Division 4
EASTGroup1@abc.comABC DivXYZ Div123 Div 
EASTGroup2@abc.comABC DivXYZ Div123 DivNEW Div
SOUTHGroup3@abc.com777 Div555 Div  

 

I unpivoted the above to make it easier. 

 

The Fact has data of GI's for divisions . Group1@abc.com should see only the qty of 50 for 3rd Oct. How can i filter in RLS for all various divisions based on email.

 

GI NoDateQtyDivision
10001-Oct-2125XYZ Div
10013-Oct-2130ABC Div
10023-Oct-2120ABC Div
100315-Oct-2170555 Div
100415-Oct-2150123 Div
100520-Oct-21100NEW Div

 

How can i apply the RLS to handle this dynamically?  the pbix file is 

https://drive.google.com/file/d/1LKEIZmqAghp-El47AB_r0uWo0nWEbuCp/view?usp=sharing

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Here is an article on how to use Dynamic RLS with detailed steps, please check if it will help you with your problem:

what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi 

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

Here is an article on how to use Dynamic RLS with detailed steps, please check if it will help you with your problem:

what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi 

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Unpivot all these four columns

Division 1 Division 2  Division 3 Division 4

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Rename attribute as Divisio

 

Join Division of table 1 with division of table2 (Filter direction - Bidirectional or From Table 1 to Table2)

 

Create RLS role and filter Table1 based on user principal name 

 

refer, if needed

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 . 

 

The issue is the Access Grp after unpivoting will have the below effect. This prevents from doing any joins on Division Name

Pbi07_0-1638977304312.png

Pbix -  https://drive.google.com/file/d/1LKEIZmqAghp-El47AB_r0uWo0nWEbuCp/view?usp=sharing

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