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
speedramps
Super User
Super User

Dynamic Row Level Security

Can you help with this RLS (row Level security) logic please? 

Adk if you need any more info or examples.

 

The attached PBIX has dynamic row level security rules

Click here to download example PBIX 


The rule are in the Permissions tables for
the DimProduct, DimCustomer and Calendar

 

For example,

If you view as user 2019@pbi.com then you just see 2019 sales

If you view as user cars@pbi.com then you just see car sales.

If you view as user carsbikes@pbi.com  then you just see car and bike sales.

If you view as user malecarsbikes2019@pbi.com then you just see male, car or bikes for 2019 sales.

 

I now want to add the functionality to block rows.

For example

If you view as user  carsbikesnot2019@pbi.com then I want to view

cars and bikes sales but exclude car 2019 sales.

 

Can you suggest RLS logic to do that please?  Thank you

 

Permissions table.  Note the allow true/false flag 

speedramps_1-1660762582419.png

 

Roles table security 

speedramps_2-1660762791740.png

 

 

Whilst viewing as user carsbikes@pbi.com you just see car and bike sales.

speedramps_4-1660763623383.png

 

 


When I view as user  carsbikesnot2019@pbi.com then I want to view

cars and bikes sales
exclude car 2019 sales

but still include the bike 2019 sales.

 

speedramps_3-1660763334413.png

 

 

 

1 REPLY 1
HoangHugo
Solution Specialist
Solution Specialist

I think, add new column in Calendar to define which year is "Ex 2019", then add one more filter in RLS like below

Capture 8.PNG

Capture 7.PNG

Capture 9.PNG

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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