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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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