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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Tmk123
Helper II
Helper II

DAX to match two columns in two tables and return value in lookup table

Relatively new to Power BI.  I need help with some Dax that will match the Item in Table A with the Item in Table B and return the Vendor associated with that text match.  

 

-The first row in Table A should return "Ford"

-The second row in Table A would not have a match and should remain blank

 

I could not find any help with this issue in the forum.  I only saw questions asking for matching confirmations, not returning a value like in another column.  Thanks All!  You are so helpful.

 

Table A 
ItemVendor
abc123 
abc234 

 

Table B 
ItemVendor
abc123Ford
abc555Tesla
abc321Toyota
1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

hi, @Tmk123  

 

try below

LOOKUPVALUE('Table b'[vendor],'Table b'[item],'Table a'[item])
Dangar332_0-1696090709525.png

 

 
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Dangar332
Super User
Super User

hi, @Tmk123  

 

try below

LOOKUPVALUE('Table b'[vendor],'Table b'[item],'Table a'[item])
Dangar332_0-1696090709525.png

 

 
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
TomMartens
Super User
Super User

Hey @Tmk123 ,

 

the DAX function you have to use is LOOKUPVALUE. See here for an explanation of this function https://dax.guide/lookupvalue/
Be aware that LOOKUPVALUE assumes that an item only has one vendor, if an item is provided by more than one vendor an error is raised, but this is also explained in the article.

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.