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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HamidBee
Impactful Individual
Impactful Individual

What does it mean to apply a security filter in both directions?

In the following scenario:

 

Security Filter.png

 

What does it mean to apply a security in both directions?

 

Thanks

1 ACCEPTED SOLUTION
v-xiaoyan-msft
Community Support
Community Support

Hi @HamidBee ,

 

By default, row-level security filtering uses single-directional filters, regardless of whether the relationships are set to single direction or bi-directional. You can manually enable bi-directional cross-filter with row-level security by selecting the relationship and checking the Apply security filter in both directions checkbox. 

 

This option is only relevant if you have set row-level security in your model.
For a RLS to be effective across multiple instances of Dim table and not explicitly on the one which we created ,we have to explicitly Apply security filter in both directions.

 

For example, I have 2 DIM tables for Employee and Company, and 2 fact tables for EmployeeSalary and Sales.

Company and sales are 1:m relationship, Employee and EmployeeSalary are 1:1 relationship, Company and Employee are 1:m relationship

Assume that RLS is applied to the Employee table based on login.

If a bidirection filter is not applied, slicing by company is used for sales and employee salaries.
The result will be that the employee will be able to see not only his salary but also the sales of all companies
If a bidirection filter exists, then the user will only see sales for the company he is tagged in.

 

For more information,you can refer to:How does Row Level Security works when there is a BI-Directional Filter in Power BI/Tabular Model? 

 

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-xiaoyan-msft
Community Support
Community Support

Hi @HamidBee ,

 

By default, row-level security filtering uses single-directional filters, regardless of whether the relationships are set to single direction or bi-directional. You can manually enable bi-directional cross-filter with row-level security by selecting the relationship and checking the Apply security filter in both directions checkbox. 

 

This option is only relevant if you have set row-level security in your model.
For a RLS to be effective across multiple instances of Dim table and not explicitly on the one which we created ,we have to explicitly Apply security filter in both directions.

 

For example, I have 2 DIM tables for Employee and Company, and 2 fact tables for EmployeeSalary and Sales.

Company and sales are 1:m relationship, Employee and EmployeeSalary are 1:1 relationship, Company and Employee are 1:m relationship

Assume that RLS is applied to the Employee table based on login.

If a bidirection filter is not applied, slicing by company is used for sales and employee salaries.
The result will be that the employee will be able to see not only his salary but also the sales of all companies
If a bidirection filter exists, then the user will only see sales for the company he is tagged in.

 

For more information,you can refer to:How does Row Level Security works when there is a BI-Directional Filter in Power BI/Tabular Model? 

 

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@HamidBee , refer from doc

and checking the Apply security filter in both directions checkbox. Select this option when you've also implemented dynamic row-level security at the server level, where row-level security is based on username or login ID.

 

https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#define-roles-and-rules-in-power-bi...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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