Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Team, I need a help in creating employee hierarchy in Power BI. I have the data in my table as below.
Level1 | Level2 | Level3 | Level4 |
James | Chris | William | David |
James | Chris | William | Richard |
James | Chris | William | Joseph |
James | Chris | Henry | Thomas |
James | Chris | Alexander | Charles |
James | Chris | Robert | Kylo |
James | Bob | Creed | Zayn |
James | Bob | Saint | Mikael |
James | Bob | Saint | Franco |
James | Bob | Kye | Kobe |
James | Bob | Kye | Rio |
James | John | Seth | Ernest |
James | John | Jason | Samuel |
James | John | Jason | Perry |
James | John | Jason | Jack |
James | John | Athur | Amos |
James | Marco | Jasee | Eric |
James | Marco | Jasee | Eli |
James | Marco | Hawn | Ward |
I have 4 levels of hierarchy. L1 is the highest level and L4 being the lowest level
Requirement: I should have one Employee slicer (should contains both Employees and Managers) where I have to select the name (either employee/manager), If that employee name found in the table and that employee has any direct and indirect reporties, then I have to show those in a table in level wise as seperate columns (Level 1 is searched employee, L2 is L1's direct reports, L3 is L2's direct reports and L4 is L3's direct reports). If that employee has only 3 levels then 4th level can be blank etc.,
Ex 1: If I search for James, then I should see the above table.
Ex 2: If I search for Bob, then I should see Bob in L1 and Bob's direct reports (Creed, Saint, and Kye) in L2 and Creed, Saint, and Kye 's direct reports (Zayn, Mikael, Franco, Kobe, Rio) in L3 and if Zayn, Mikael, Franco, Kobe, Rio has any direct reports then thier direct reports should show in L4
Ex 3: If I search for Saint, then I should see Saint in L1 and Saint's direct reports (Mikael and Franco) in L2 and if either Mikael or Franco has any direct reports then those direct reports should show in L3 and so on...
Hope you get my requirement clear. Please help me with this requirement. Let me know if you need any other information.
Thanks!
Team, Any help here is much appriciated.
Thanks!
Hi, @Anonymous ,
you can do following:
Use slicer and put all Levels accordingly:
Active "Search" option by the "three dots" on the Slicer visual and expand every manager:
Then Just Filter your name and click it (James), then you will see your table:
Then if I clear everything out and search for "Mikael" I got the following table:
Thanks @vojtechsima for your response! I'm not getting the desired result. If I select "William", I'm not getting all his direct reports, only few of them are showing and in the next level also few of the employees are missing.
@Anonymous,
I see, well, in this case, this only works in a way that it shows everybody under the selected person, however, doesn't show people that reports to a person that selected employee reports.
@amitchandak Would you please advise how to modify this solution to achieve @Anonymous 's goal?
Yes @vojtechsima, True. Hey @amitchandak - would be very helpful if you can see and give your view on my requirement.
Thanks!