Forum Discussion

PrintDream's avatar
PrintDream
Regular Visitor
4 years ago
Solved

Recursive Hierarchy; Managers and Employees

Hello PowerBI Community!

 

I am trying to accomplish an organizational hierarchy report based on a table Managers and Users. Sample data below:

As you can see, every employee should have a managerID associated to them.

 

The best visualization will most likely come from a Matrix or a Hierarchy Slicer, but it seems the dropdowns are not as recursive as I need them to be (i.e. Manager456->Manager123 should have the users of Manager123):

 

I assume I will need to write a query to build this heirarchy, but I do not know how many levels up/down I will have, so adding Paths/columns will not work here. Any anecdotes, examples or pointers are much appreciated.

 

Thanks,

PrintDream

 

2 Replies