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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
user131313
Frequent Visitor

Dynamic Row Level Security with multiple user tables

Hi,

 

The logic is really escaping me on how I can deal with this issue and I can't find anything that is exactly the same so I'm hoping someone can help!

 

I have a list of users for my Power BI report. Some of them will need access to All rows in my fact table, some will need to have a subset, based on my [department] field, held both in my user table and in my fact table. I need it to work using dynamic row level security.

 

I've tried separating out the users into two tables and then creating a join from the "Full Access User" table to the Fact Table on a field I have just called "All" in both tables. I then link the "Subset User" table to the Fact Table on the "department" field. That does cause a many to many relationship though in both cases which limits what I can do.

 

When I come to look at the Roles to implement the security - using two user tables doesn't exactly work as its an AND between two tables and it just shows no data for any user.

 

I tried this separation of tables as I read that USERELATIONSHIP type logic wouldn't work with RLS? And the only solution I can think is to create two different joins to the fact table? But I could have one table with all the users if that's a better solution and it could work somehow.

 

Any pointers would be very very much appreciated! I think my main issue is how the tables join together, which seems simple but isn't?

 

1 ACCEPTED SOLUTION
user131313
Frequent Visitor

Thanks for this! I was looking for some way around the many to many solution but I couldn't find one. To get around the need for two tables etc I just blew out my user table to have one line per "department" that I'm joining back to my main fact table on. This seems to work, I'd like to get around the many to many relationship but I'm not sure there is a solution!

View solution in original post

2 REPLIES 2
user131313
Frequent Visitor

Thanks for this! I was looking for some way around the many to many solution but I couldn't find one. To get around the need for two tables etc I just blew out my user table to have one line per "department" that I'm joining back to my main fact table on. This seems to work, I'd like to get around the many to many relationship but I'm not sure there is a solution!

lbendlin
Super User
Super User

Your RLS reference table should have a department column and a "See all"  column.  Then your RLS rule can be 

 

[Department] = "xxx" || [See all]

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.