The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
So I'm trying to impliment RLS for a HR Dashboad, but I've found the RLS setup is so complicated I haven't been able to wrap my head around it yet.
I have table called Headcount, which has the following fields to name a few.
That table has relationships that filter the following tables
and I also would like it to filter another table based on the "Division" but there is no relationship setup there.
So my question is, what is the best approach here? It would be great if the visibility could cascade based off the Manager ID field, but it might be more sustainable to set up the visibility so that you can only see inside of your Division, and someone of lower senority. But, I have no idea how to set that up. I'll continue researching, but if anyone has any exprience setting up something similar I would apprichiate it!
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
181 | |
82 | |
63 | |
47 | |
43 |