Forum Discussion
Help with Row level Security
I have a fact table with these information
| Manager | Supervisor | Agent | Month-Year | Commission |
| Beth | Tony | ravi | Saturday, January 1, 2022 | 252 |
| Beth | Tony | bhushan | Saturday, January 1, 2022 | 358 |
| Beth | Xin | john | Saturday, January 1, 2022 | 368 |
| Beth | Xin | thomas | Saturday, January 1, 2022 | 357 |
| Hemanth | rahul | raju | Saturday, January 1, 2022 | 359 |
User table:
| Role | Username | |
| Manager | Beth | [email protected] |
| Manager | Hemanth | [email protected] |
| Supervisor | Tony | [email protected] |
| Supervisor | Xin | [email protected] |
| Supervisor | rahul | [email protected] |
| Agent | ravi | [email protected] |
| Agent | bhushan | [email protected] |
| Agent | john | [email protected] |
| Agent | thomas | [email protected] |
| Agent | raju | [email protected] |
hierarchy ---manager-->supervisor-->agent
When agent log in to power bi service then he can only view his data,
when supervisor logs in he can view the data of agents who reports to him,
when manager logs in he can view the data of supervisors and agents who reports to him.
Thanks in advance
Hi,
Please check the attached pbix file, and the below pictures.
I suggest having a [Report to] column in Users table, like the attached pbix file.
And then, try creating [Path CC] column in the same table.
Path CC = PATH( User[Username], User[Report to] )Under "Manage roles" menu,
try wrting a formula like below.
And then, you can try to test the result of RLS.
4 Replies
- Jihwan_KimSuper User
Hi,
Please check the attached pbix file, and the below pictures.
I suggest having a [Report to] column in Users table, like the attached pbix file.
And then, try creating [Path CC] column in the same table.
Path CC = PATH( User[Username], User[Report to] )Under "Manage roles" menu,
try wrting a formula like below.
And then, you can try to test the result of RLS.
- hemanth_423Frequent Visitor
Thanks a lot for the solution
- IdrissshatilaSuper User
Hello,
Check this video to make RLS based on the email https://www.youtube.com/watch?v=axTyP7I2Bso&t=408s
If I answered your question, please mark my post as solution, Appreciate your Kudos👍
- hemanth_423Frequent Visitor
Hi
Thank you for the response but i have a differnet scenario where i cant have relationship between fact and security table