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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Hierarchy Chart (Org Chart) & Row Level Secutity (RLS)

Hi

 

I’m trying to set up Row Level Security on a report based on HR Data

And I am trying to do an org chart for the organisation.

 

The Way it works:

An employee has a position number, and that position number reports to another position number.

 

The issue is:

An employee can be acting in another position (Thus have two position numbers)

An Employee can be in two or more positions and thus have multiple positions.

A position can have multiple employees

A position with multiple employees can be job shared and thus  position reports to only one position has two people split (e.g. one on Mon-Wed and the other Thu – Fri)

Users on leave (either Long Service, Annual, Merterniaty are technically in their position, but someone else would be acting)

With the above, another person might be acting in their position, or they are undertaking both positions/roles.

 

Has anyone come across this and worked out how this can be achieved as I have used the PATH and LOOKUPVALUE, but it gets stuck when there are multiple values in return, and it expects only one to be returned.

 

Eg

 

Path =

PATH (

    'EmployeeInfo'[PositionNumber],

    'EmployeeInfo'[ReportsTo]

)
Level 1 =

LOOKUPVALUE (

    'EmployeeInfo'[Employee_Name],

    'EmployeeInfo'[PositionNumber], PATHITEM ( 'EmployeeInfo'[Path], 1, 0 )

)

 

When I get to level 3 is when I get multiple and I have a seven levels

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , refer if these can help you

https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi @amitchandak 

 

Thanks for the response, and I have used the radacad code.

But that works on a one to one 

A position number reports to one position number, but

I want to display the employee name as well which could be 2 or more employees.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.