Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I'm having troubles setting RLS to one of my reports.
I have a fact sales table such as:
| Office | …(other columns, not relevant) |
| 1 | … |
| 1 | … |
| 1 | … |
| 2 | … |
| 2 | … |
| 3 | … |
| 4 | … |
| 4 | … |
Dimension tables:
Office:
(One row per office code)
| Office Code | Office Name |
| 1 | A |
| 2 | B |
| 3 | C |
| 4 | D |
Users:
(Determines the offices that the users should see, can have multiple offices codes for one user)
| Users | Users email | Office Name |
| AA | ...@... | 1 |
| AA | ...@... | 2 |
| AA | ...@... | 3 |
| AA | ...@... | 4 |
| AB | ...@... | 2 |
| AB | ...@... | 3 |
| AB | ...@... | 4 |
| AC | ...@... | 4 |
| AD | ...@... | 2 |
I have a bidirectional filter set between Users and Office and a Single direction filter between Office and my facts table.
Then I have the next Role in the table Users:
[Users email] = USERNAME()
Any ideas why this doesn't work? Or how should I do it?
Thank you a lot ofr your help.
Regards,
Hello @luxpbi
You have many to many relationship between offices and users.
You can build the below model:
and then use this RLS rule:
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Hi @LivioLanzo,
It's a very good idea the Users email table. But it is not working.
I'm testing it in my workspace, can this be a issue?
It's going to be hard for me to test it with others users...
Regards,
I'd first test it within Power BI Desktop to see how it works and you can test it for different email addresses
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 40 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 131 | |
| 105 | |
| 60 | |
| 56 | |
| 55 |