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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
KasperBI
Frequent Visitor

Help with RLS

Hi Power BI

 

I'm sure that there is a tutorial for this type of RLS, I just don't know where to find it

 

I have the following tables:

User: a list of users (userID unique identificer) including e-mail

Access: A list of users (userID) and which accounts they should have access to. No unique key here necessarily. It will just have user 1, account 1, user 1, account 2, user 1, account 3, user 2, account 1, user 2, account 2 etc. Many users many accounts.

 

My fact table contains no userID, but contains accountID.

 

How do I set up RLS, in such a way that the fact table is filtered to the user logging in, and only being able to see their own accounts?

 

Thanks in advance

2 REPLIES 2
amitchandak
Super User
Super User

@KasperBI , You can have many to Many join on account, user id means email id should be used as filter on this table

 

In the role

email/userid = userprincipalname()

 

 

refer if needed

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

https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies

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 

 

It sort of works. 

 

I have set up 3 tables to test, 

1: Contains e-mail from user table

2: Contains e-mail from access table (user and accounts for that user)

3: fact-table, contains account.

 

There is a 1 to many relationship between table 1 and 2 (user e-mail), and a many to many relationship on account nr. between 2 and 3

 

When I filter table 1 by clicking on the table, table 2 and 3 filters correctly

When I filter the report page by inserting user email from table 1 into the filter pane table 2 and 3 filters correctly

When I test with RLS [UserEmail]=USERPRINCIPALNAME() table 1 & 2 filters correctly, but not table 3. Table 3 doesn't filter at all this way, even though in my mind I'm applying the exact same filter context in all 3 scenarios. What could be the cause?

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.