Forum Discussion
Dynamic Hierarchy Slicer based on RLS
- 1 year ago
Hi SreeniBattula ,
Thank you for reaching out to us on the Microsoft Fabric Community Forum.
This is actually a common challenge in Power BI getting slicers to show only the part of the hierarchy that a user is allowed to see under RLS. While there is a way to do it using dynamic hierarchy tables, it's not straightforward and does require some fairly advanced modeling.If you haven’t already, I’d suggest sharing this on the Power BI Ideas forum. It’s definitely a feature that would make things a lot easier for scenarios like this, where we want slicers to fully respect RLS and only show relevant people in the hierarchy.
Appreciate if you could share the feedback on our Fabric Ideas - Microsoft Fabric Community Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Best Regards,
Menaka.
Community Support Team
Its a hierarchical slicer, so I guess you would have placed L1,L2,L3,L4 columns in the slicer.
As you are aware
Carrie Mathison name is appearing in the slicer as per the RLS filter (i.e. L2 = Jack Bauer)
Jack Bauer (L2) is the suboordinate of Carrie Mathison (L1). Applying another filter to remove/hide Carrie, will remove Jack. Because if I am not mistaken for every record where L2 is Jack, L1 would be Carrie
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
Filtering the data alone won’t work—we need to implement logic that builds the path and levels dynamically based on the selected user in RLS. Unfortunately, we can't use the USERNAME() or USERPRINCIPALNAME() functions when creating custom tables.
- v-menakakota1 year agoCommunity Support
Hi SreeniBattula ,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like just applying RLS won't stop higher-level users like a manager from showing up in the hierarchy slicer. This happens because the data still includes the full reporting path from top to bottom, so those names continue to appear in the slicer.
To fix this,i think you can try this the hierarchy needs to be modeled differently. Instead of using fixed levels like L1, L2, L3, you would need a structure that only includes the current user and the people who report under them. That way, the slicer will only show that part of the hierarchy and automatically exclude higher-level users like their manager.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Menaka.
Community Support Team- SreeniBattula1 year agoHelper II
Hi v-menakakota , you understood my problem, but we need a solution to create Levels L1,L2,L3... dynamically based on selected user in RLS.
- v-menakakota1 year agoCommunity Support
Hi SreeniBattula ,
Thanks for reaching out to the Microsoft fabric community forum.
Fixed levels like L1, L2, L3 don't adapt dynamically based on the RLS context, which is why managers still appear in the slicer even though their data is excluded.
Please go through the below document:
Dynamic Row-Level Security (RLS) in Power BI with Organizational Hierarchy Explained - Power BI Docs
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Best Regards,
Menaka.
Community Support Team