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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
nmck86
Post Patron
Post Patron

Manager Level Hierarchies with multiples in Power BI

HI All:

 

I have noticed a few posts on building Hiearchies based on manager level but havent had success replicating. I am attaching a sample file and I am hoping that someone can assist me. I want to be able to show all employees who role up to Liz Goode in this example. Then I would like to show all those who role up to Julie Jones and so on and so forth. The example I gave is extremely simple but I am hoping it will provide you with all you need to help me out! Thanks so much.

 

 sample file.png

 

1 ACCEPTED SOLUTION

Hi @nmck86,

 

You can try to use path function to get the hierarchy level, then use pathitem to create calculated columns to store different levels.

Sample:

Path = PATH('Sample'[Employee Source ID],'Sample'[Manager Source ID]) 

 

7.PNG

 

Different level formula:

level 1 = PATHITEM([Path],1)
level 2 = PATHITEM([Path],2)
level 3 = PATHITEM([Path],3)
level 4 = PATHITEM([Path],4)
level 5 = PATHITEM([Path],5)

8.PNG

 

Create custom hierarchy:
9.PNG

 

Reference link:

Parent-Child Hierarchies

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi, 

 

If I have a table that contains like 150 project managers but not the names of their subordinates and that I have a RLS that allows these managers to only see their projects how would I create a hierarchy that would allow access to the managers' assistants to their managers' project ?

 

Thanks you in advance !

Niep2000
Regular Visitor

Hi There I am trying this in power BI desktop but am getting the following error Expression ErrorL The name 'PATH' wasn't recognized. Make sure it is spelled correctly. 

 

Its almost like the function doesn't exist in power BI desktop?

Niep2000
Regular Visitor

Hi There I am trying this in power BI desktop but am getting the following error Expression ErrorL The name 'PATH' wasn't recognized. Make sure it is spelled correctly. 

 

Its almost like the function doesn't exist in power BI desktop?

nmck86
Post Patron
Post Patron

Employee Source IDManager Source IDEmployee NameManager NameManager Level CodeManager Level Name
12341109Julie JonesLiz Goode2SVP
1109 Liz Goode 1CEO
82641234Carlye BoyzeJulie Jones3VP
64838264Chuck TartCarlye Boyze4Director
73836483Nic BrownChuck Tart5Individual Contributor
81308264Michelle BobbyCarlye Boyze4Director
78130Peter SherryMichelle Bobby5Individual Contributor
7402 Timm Abosh 5Individual Contributor

Hi @nmck86,

 

You can try to use path function to get the hierarchy level, then use pathitem to create calculated columns to store different levels.

Sample:

Path = PATH('Sample'[Employee Source ID],'Sample'[Manager Source ID]) 

 

7.PNG

 

Different level formula:

level 1 = PATHITEM([Path],1)
level 2 = PATHITEM([Path],2)
level 3 = PATHITEM([Path],3)
level 4 = PATHITEM([Path],4)
level 5 = PATHITEM([Path],5)

8.PNG

 

Create custom hierarchy:
9.PNG

 

Reference link:

Parent-Child Hierarchies

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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