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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lennythelucker
Regular Visitor

Creating a user hierarchy from a manager column to use as hierarchy slicer

Hi All,

 

I am breaking my head on this for several days now, so time to share this in the hope to get some new idea's / solution

I like to build a user hierarchy based on 1 column, The Manager column and use it in a hierarchy slicer,

 

I also want to connect this to the countries / regions slicer, so if you filter on a region, you see only the hierarchy of that region

I only want to get the hierarchy in place for the salesusers in the database

If I select a salesmanager, I want to see his data + all people in the team (under the SM in the hierarchy)

 

herunder an example of what I am trying.

hope somebody has an idea how to handle this,

 

thanks!

 

 

Picture1.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lennythelucker,

 

You can try to use path and pathitem function to get the role hierarchy.

 

Steps:

1. Calculate column to analysis the role relationship:

Path = PATH(Role[Full Name],Role[Manager])

2.PNG

 

 

2. Add calculated columns to store the analysis relationship to original table:

First = PATHITEM([Path],1,0)
Second = PATHITEM([Path],2,0)
Third = PATHITEM([Path],3,0)
Fourth = PATHITEM([Path],4,0)

 

4.PNG

 

3. Create custom hierarchy with above columns.

5.PNG

 

 

Notice: sample table.

3.PNG

 

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @lennythelucker,

 

You can try to use path and pathitem function to get the role hierarchy.

 

Steps:

1. Calculate column to analysis the role relationship:

Path = PATH(Role[Full Name],Role[Manager])

2.PNG

 

 

2. Add calculated columns to store the analysis relationship to original table:

First = PATHITEM([Path],1,0)
Second = PATHITEM([Path],2,0)
Third = PATHITEM([Path],3,0)
Fourth = PATHITEM([Path],4,0)

 

4.PNG

 

3. Create custom hierarchy with above columns.

5.PNG

 

 

Notice: sample table.

3.PNG

 

Regards,

Xiaoxin Sheng

THANK YOU, THANK YOU, THANK YOU!!!!!

WOW!!

 

I already tried step 1, but then went in the direction of a calculated table and got lost in my logic 🙂

This works perfectly, I am soooo happy

 

I didn t know this pathitem formula, really cool

 

again, thank you so so so so soooo much!!!!

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.