Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
WillBeeSEA
Helper III
Helper III

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 column with the Manager's name for each employee.  If it was a lookup from another table, I think I could do that, but looking up another row in this table is not working for me.  How would I do that?  Thank you in advance.

WillBeeSEA_0-1752710360306.png

 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

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

 

Assuming the table has this data

 

sevenhills_0-1752711176026.png

 

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:

sevenhills_1-1752711206713.png

 

Hope this helps!

 

View solution in original post

3 REPLIES 3
sevenhills
Super User
Super User

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

 

Assuming the table has this data

 

sevenhills_0-1752711176026.png

 

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:

sevenhills_1-1752711206713.png

 

Hope this helps!

 

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! 🙂 

WillBeeSEA_0-1752711555631.png

 

Glad to hear that it worked. Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.