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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Edirin
Frequent Visitor

Help with LOOKUPVALUE

I have 2 tables...

 

Table 1

Employee ID

Employee Name

E001

Jaimie

E002Fred
E003Isaac
E004Jones
E005Billy

 

Table 2

Job IDEmployee IDLine Manager Job IDLine Manager Employee IDLine Manager Name
J001E001   
J002E002J001E001 
J003E003J002E002 
J004E004J002E002 
J005E005J003E003 

 

I was able to populate the Line manager employee ID as follows...

Line Manager Employee ID = LOOKUPVALUE('Table 2'[EmployeeID], 'Table 2'[JobID], 'Job DB'[LineManagerJobID])
 
Now i'm trying to get the line manager name; but doing this just returns blank values (looking up the lookup value)...
LOOKUPVALUE('Table 1'[Employee Name], Table 1[Employee ID], 'Table 2'[Line Manager Employee ID])
2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@Edirin Hmm, worked perfectly fine for me, see attached PBIX. Perhaps trying to do a Trim and Clean in Power Query for all of your columns to remove trailing whitespaces, etc. See attached PBIX below signature.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-yalanwu-msft
Community Support
Community Support

Hi, @Edirin ;

You could try create a column by dax.

Line Manager Name = CALCULATE(MAX('Table1'[Employee Name]),FILTER('Table1',[Employee ID]=EARLIER(Table2[Line Manager Employee ID])))

Or

Column = LOOKUPVALUE('Table1'[Employee Name],Table1[Employee ID],'Table2'[Line Manager Employee ID])

The final show:

vyalanwumsft_0-1664876270971.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Edirin ;

You could try create a column by dax.

Line Manager Name = CALCULATE(MAX('Table1'[Employee Name]),FILTER('Table1',[Employee ID]=EARLIER(Table2[Line Manager Employee ID])))

Or

Column = LOOKUPVALUE('Table1'[Employee Name],Table1[Employee ID],'Table2'[Line Manager Employee ID])

The final show:

vyalanwumsft_0-1664876270971.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

@Edirin Hmm, worked perfectly fine for me, see attached PBIX. Perhaps trying to do a Trim and Clean in Power Query for all of your columns to remove trailing whitespaces, etc. See attached PBIX below signature.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.