Forum Discussion
Row level security and relationship
Hi jdusek92 ,
This feature is for direct query and by default, the 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 to apply bi-directional.
Reference:
https://docs.microsoft.com/en-us/power-bi/desktop-bidirectional-filtering
Regards,
Daniel He
- jdusek927 years agoAdvocate III
Apply security filter in both directions does the trick indeed.
But when I want to have more tables and apply RLS to all of them, I am getting this error message:
How can I work this around ? I want to filter all the tables based on a record in "Employees" table.
- v-danhe-msft7 years agoMicrosoft Employee
Hi jdusek92 ,
Based on my research, it is due to your relationship will result in a circle filtering that Power BI will not let to create a full circle of relationships between tables due to ambiguity in filtering.
Reference:
Regards,
Daniel He
- jdusek927 years agoAdvocate III
Hello v-danhe-msft , thank you for your research. the reference is very helpful, but still:
I understand that I cannot create circular relationships like you show show in the picture.
According to your reference it is recommended to use a Star Schema:
In my opinion I am using this type of schema, I do not have any circular relationships:
Yet I cannot use RLS filtering from EMPLOYEES table to filter BOTH look-up tables (JOBS and CHAIRS). I can be set to filter only one at a time. I need all the related tables to be filtered by RLS
Example pbix is attached here:
https://drive.google.com/open?id=1Y0sYDcSULkRQGpYWv9nfMzaOVzWFrozo
Try view as role:
Maybe this is a limitation of Row Level Security / Roles ?
Regards,
Jakub