Forum Discussion
KatTheDuck
2 years agoNew Member
Dealing with RLS and many-to-many relationship
Hi, I have been learning power bi for some time and recently I "inherited" a report from a person who no longer works in my company. I was asked to refresh it, so it wasn't difficult, but when I loo...
- 2 years ago
hey KatTheDuck
Maybe you can create a bridge table that contains three columns: EmployeeID, DepartmentID, and a flag indicating if the employee is a manager/deputy (True/False). Then you can create one-to-many relationships from the Employee table to the bridge table and from the Department table to the bridge table, and you can set the RLS on the department ID in the bridge table where the manager/deputy flag is True.
lbendlin
Super User
2 years agoYou cannot always avoid many to many relationships. What you must avoid if you want RLS to be successful is bidirectional many to many relationships, or worse, those and RLS on both sides. You want your RLS filters to flow only in one direction - from the outside of your data model to the inside.