Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Chris2016
Resolver I
Resolver I

RLS for org hierarchy levels that displays aggregates for the lowest level

Hello,

I have to create row level security for different levels of management, where all the managers in the various levels see only their own data, but the bottom level (employee sales) is aggregates only.

To be more clear, the table is something like this:

Department ManagerDivision ManagerSubdivision ManagerEmployeeSales
A@store.comab@store.comabc@store.comL100
A@store.combc@store.comcde@store.comM140
A@store.comcd@store.comefg@store.comN150
B@store.comde@store.comghi@store.comO50
B@store.comef@store.comijk@store.comP15
B@store.comfg@store.comklm@store.comQ20
B@store.comgh@store.commno@store.comR70
C@store.comhi@store.comopq@store.comS110
C@store.comij@store.comqrs@store.comT90


The RLS should ensure that the mangers in any level of management see the data for their own directs, but only aggregates at employee level.

For example, Department manager B@store.com should see this, where #Sales is the sum of sales for all Employees reporting to them:

Chris2016_0-1764160197354.png

 

Division manager ab@store.com should see this:

Chris2016_2-1764160351712.png

Whereas a Subdivision manager such as mno@store.com should see this.

Chris2016_3-1764160428231.png

The Employees are not exposed in the visual, but all their sales aggregates should be visible to their managers in all the levels.

Any idea how to achieve this? Many thanks! 

 






2 ACCEPTED SOLUTIONS

@Chris2016 , Try if this role can help . Test File attached after Signature 

[Department Manager] = USERPRINCIPALNAME() || [Division Manager] = USERPRINCIPALNAME() || [Subdivision Manager] =USERPRINCIPALNAME()

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Thanks so much, this also works, I also just solved it in a similar way, by using a mock Path:

_Concatenate = [CEO] & "|" & [Department Manager] & "|" & [Division Manager]  & "|" & [Subdivision Manager]  & "|" & [Employee]

 

Then add this in the table in Manage Roles:

 

PATHCONTAINS(
    'Table'[_Concatenate],
    USERPRINCIPALNAME()
)

 

Thanks so much for all your help!

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Chris2016 , Check if this article from RADACAD can help 
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks a lot for the suggestion, I looked at the article, unfortunately my model has Levels of hierarchy and I don't know how to arrive at the view that Reza has in his demo - ID, Name and Manager ID. If you could help me with that, i would appreciate it very much. Thanks!

@Chris2016 , Try if this role can help . Test File attached after Signature 

[Department Manager] = USERPRINCIPALNAME() || [Division Manager] = USERPRINCIPALNAME() || [Subdivision Manager] =USERPRINCIPALNAME()

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks so much, this also works, I also just solved it in a similar way, by using a mock Path:

_Concatenate = [CEO] & "|" & [Department Manager] & "|" & [Division Manager]  & "|" & [Subdivision Manager]  & "|" & [Employee]

 

Then add this in the table in Manage Roles:

 

PATHCONTAINS(
    'Table'[_Concatenate],
    USERPRINCIPALNAME()
)

 

Thanks so much for all your help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.