Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Lookup Manager's name from same table

See the simple table below, with Employee ID  and Name, and the Manager's ID (which is also a row in the table.  I found the PATH and PATHLENGTH functions, thinking they could help me disply another ...
  • sevenhills's avatar
    1 year ago

    https://www.daxpatterns.com/parent-child-hierarchies/

     

    Assuming the table has this data

     

     

    Added these 3 columns (and not measures), see if this works the same as you needed!

    Path Function = PATH(Table1[Employee ID], Table1[Manager ID])
    
    Path Length = PATHLENGTH(Table1[Path Function])
    
    Manager Name = LOOKUPVALUE( Table1[Employee Name ], Table1[Employee ID], Table1[Manager ID])

    Output:

     

    Hope this helps!