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
cferv_77
Helper I
Helper I

Trying to setup RLS based on a dynamic table

So I have these tables

- Main table contains the data and it has a 'security column' set to Allowed. 

- RLS is just a regular table with Allowed and Denied

- Employees is a table that is "connected" to our HRIS. The logic column that is implemented on who shall have access based on their job title.  

 

I tried creating a relationship between all the tables and then implement the USERPRINCIPALNAME() on the email of the Employees table, but I don't know if the relationship is off or I am implementing RLS wrong. Relationship between Main Table and RLS on the security column, RLS and Employees (cross filter direction = both) on the logic column.

 

See image below. Appreciate any help on this. Thank you. 

 

rls.png

3 REPLIES 3
christinepayton
Super User
Super User

It would help if you shared your RLS DAX I think-- 

Hello @christinepayton 

I tried a few RLS DAX

 

1. [Email] = USERPRINCIPALNAME() 

2. [Email] = USERPRINCIPALNAME() && [Access]="Allowed"

Is your relationship on the allowed/denied column? I'm not sure what the RLS table is doing in your diagram, I think you'd want the RLS rule to be on the Employees table in that case (it'd be acting as the RLS table). This is a bit of an odd way to use it either way, usually you'd use USERPRINCIPALNAME to filter rows with the relationship on an email address field in the fact table. 

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