Forum Discussion
nmck86
Post Patron
8 years agoManager 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 wan...
- Anonymous8 years ago
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])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)
Create custom hierarchy:
Reference link:
Regards,
Xiaoxin Sheng
nmck86
Post Patron
8 years ago| Employee Source ID | Manager Source ID | Employee Name | Manager Name | Manager Level Code | Manager Level Name |
| 1234 | 1109 | Julie Jones | Liz Goode | 2 | SVP |
| 1109 | Liz Goode | 1 | CEO | ||
| 8264 | 1234 | Carlye Boyze | Julie Jones | 3 | VP |
| 6483 | 8264 | Chuck Tart | Carlye Boyze | 4 | Director |
| 7383 | 6483 | Nic Brown | Chuck Tart | 5 | Individual Contributor |
| 8130 | 8264 | Michelle Bobby | Carlye Boyze | 4 | Director |
| 7 | 8130 | Peter Sherry | Michelle Bobby | 5 | Individual Contributor |
| 7402 | Timm Abosh | 5 | Individual Contributor |
Anonymous
8 years agoNot applicable
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])
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)
Create custom hierarchy:
Reference link:
Regards,
Xiaoxin Sheng