Forum Discussion
Anonymous
1 year agoNot applicable
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 ...
- 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!
sevenhills
1 year agoSuper User
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!
- Anonymous1 year agoNot applicable
Seven Hills,
You are a Super DUPER User! I tried LOOKUPVALUE, and ended up with a lot of trash, but I must have had the wrong fields. Your solution is perfect! Thank you for a quick answer! 🙂
- sevenhills1 year agoSuper User
Glad to hear that it worked. Thanks