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
pbi1908
Helper III
Helper III

Problem with Dynamic RLS Security

Hi all, 

 

I have a table with Customers and a table with Traders. One Customer can have multiple Traders so in the Traders table i have a foreign key which is the Customer ID and one to many relationship in the Data Model.

 

 

I have a matrix visual in which in the Rows Hierarchy i have first the Customer Name from Customers table and then another four columns from other tables. I have the Trader Name as a slicer so when i filter with a trader i see only his Customers. 

 

I will share this report with the Traders and i want to apply dynamic Row level Security because each trader must strictly see his Customers.

 

In the Traders table i have the Trader mail, so i am trying to create a role in which i add as an expression 'Trader[EMAIL] = USERPRINCIPALNAME()'. When i am trying view the report as a traderi realized that i still can see all the Data and the only difference is that in the slicer i can only filter with the name of this trader but my goal is to filter the whole report with the data of this trader when he access the report and not to see everything and filter it then if he want. 

 

In the meanwhile in the matrix visual i do not have any column from traders table. 

 

 

Can anyone help me on this ?

2 REPLIES 2
Alex_Sawdo
Resolver II
Resolver II

I think you are missing something with the relationship between your tables. When you check the relationship, do you have "Apply security filter in both directions" checked or un-checked? You would need to do this for tables that don't have it selected. Also, I'm not 100% sure but the casing of the email might matter so try writing your filter like this: UPPER('Trader'[EMAIL]) = UPPER(USERPRINCIPALNAME()).

No actually what i missed was to enable the both direction in security within the properties of the relationship.

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.