Forum Discussion
Complicated Dynamic RLS for Employee Data in a Hierarchy
- 4 years ago
Hi LaneLourcey ,
First, you need a user Seniority level table, for example, officer is 1, Director OR General Manager is 2 and Area Manager is 3, then filter the fact table by the seniority level table via the if the login user is 2 then where the rows level is grater then 2, then this row can be seen by this login user.
I have found some articles about how to do dynamic RLS, you can refer.
https://radacad.com/what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi
https://blog.pragmaticworks.com/dynamic-row-level-security-in-power-bi
I create a sample pbix file in the end and you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi LaneLourcey ,
First, you need a user Seniority level table, for example, officer is 1, Director OR General Manager is 2 and Area Manager is 3, then filter the fact table by the seniority level table via the if the login user is 2 then where the rows level is grater then 2, then this row can be seen by this login user.
I have found some articles about how to do dynamic RLS, you can refer.
https://radacad.com/what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi
https://blog.pragmaticworks.com/dynamic-row-level-security-in-power-bi
I create a sample pbix file in the end and you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- LaneLourcey4 years agoFrequent Visitor
That's great stuff! I ended up figuring it out, although the solution I came up with was much more complicated in the end. I used the path function to generate a heirarchy of IDs reporting to each manager, and then used a function to show only rows that had an ID in the user's id chain.