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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
barbaracruvinel
Frequent Visitor

RLS not filtering on all graphics

I have this RLS that filters from an email table, like in the print:

barbaracruvinel_0-1635518667564.pngbarbaracruvinel_1-1635519015692.png

barbaracruvinel_3-1635519088055.png

barbaracruvinel_2-1635519033484.png

 

But when I apply the RLS with some email as a print, only one of the graphics, the first one, filters correctly:

 

barbaracruvinel_4-1635519176420.pngbarbaracruvinel_5-1635519203762.png

 

But when I tested it by applying a filter on the same email with the variable used in RLS and it works on all graphs, I don't understand why it doesn't work in RLS:

 

barbaracruvinel_6-1635519323144.png

 

Does anyone know what might be going on?

 

 

 

1 ACCEPTED SOLUTION
DataZoe
Microsoft Employee
Microsoft Employee

@barbaracruvinel The many bi-directional relationships within your model is causing ambiguity. Bi-directional relationship guidance - Power BI | Microsoft Docs For RLS to work best, it's best to have single direction filters, and that the RLS table is the most upstream.  That is, the arrows always point away from the RLS table no matter the path taken.  If you are having trouble getting it to filter in the right direction, I sometimes change relationship to M-M then you can choose whatever direction is best.

 

Additionally, you may need to use UserPrincipalName() not UserName().  UserPrincipalName() is typically the full email address like you have in your table. Restrict data access with row-level security (RLS) for Power BI Desktop - Power BI | Microsoft Docs

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

3 REPLIES 3
Utomi
Regular Visitor

I had this same problem but enabling the "Apply security filter in both directions" on one of my bidirectional relationships linking my primary table with RLS to my fact table fixed this issue.PBI FILTER.png

 

v-luwang-msft
Community Support
Community Support

Hi @barbaracruvinel ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

 

Best Regards
Lucien

DataZoe
Microsoft Employee
Microsoft Employee

@barbaracruvinel The many bi-directional relationships within your model is causing ambiguity. Bi-directional relationship guidance - Power BI | Microsoft Docs For RLS to work best, it's best to have single direction filters, and that the RLS table is the most upstream.  That is, the arrows always point away from the RLS table no matter the path taken.  If you are having trouble getting it to filter in the right direction, I sometimes change relationship to M-M then you can choose whatever direction is best.

 

Additionally, you may need to use UserPrincipalName() not UserName().  UserPrincipalName() is typically the full email address like you have in your table. Restrict data access with row-level security (RLS) for Power BI Desktop - Power BI | Microsoft Docs

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.