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
Anonymous
Not applicable

Filtering column by dynamic role

Hi all,

 

As a newbeginner this might be a very silly question. Still, after hours of googleing I haven't managed to find the solution on my own.

 

I'm using a report that can be filtered by a selected "CompanyID" using the row level security technique. I have tried to take the report to the next level by comparing the selected company to the all the companies that share the same "Branch" with the selected company. The goal is to visualize the total of "PersonID" in each "Group" value.

 

So my question is: How to tell Power BI to select every company in one Branch when the CompanyID is not static? 

 

I simplified the model to clarify the situation. Hopefully this makes any sense for you.

Julkku_0-1597838125675.png

Julkku_1-1597838759961.png

Thank you in advance!

 

Kind regards,

 

Julia

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

That's actually a conflict.  If you are limiting visibility to a certain company by using RLS then that will prevent that user from seeing the data from the other companies.

 

Reza Rad describes that scenario in great detail, but the gist is that you would need to create a second shadow set of tables that is hidden from view, and not governed by RLS.  That way you can compare the current selection to the complete data set.

 

HUGE WARNING:  Security by Obscurity does not work.  Any sufficiently knowledgeable user can crack this setup in seconds and get access to data they should not see based on the RLS.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

That's actually a conflict.  If you are limiting visibility to a certain company by using RLS then that will prevent that user from seeing the data from the other companies.

 

Reza Rad describes that scenario in great detail, but the gist is that you would need to create a second shadow set of tables that is hidden from view, and not governed by RLS.  That way you can compare the current selection to the complete data set.

 

HUGE WARNING:  Security by Obscurity does not work.  Any sufficiently knowledgeable user can crack this setup in seconds and get access to data they should not see based on the RLS.

Anonymous
Not applicable

That's what I thought. Adding tables made it work as wanted. Thank you for your guidance!

 

Julia

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.