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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sophie23
Frequent Visitor

How to LOOKUPVALUE in PowerQuery?

Hi, 

 

I added a new column referencing to two different tables using LOOKUPVALUE but it won't show in PowerQuery. 

 

Any tips on how I can replicate LOOKUPVALUE but in PowerQuery?

 

I have Table A containing Currency & Date. I want to reference to Table B, match it according to Currency & Date, then return the Exchange Rate value.

sophie23_0-1614145730769.png

 

Reason why I need to do it in PowerQuery is because I need to fill the dates with null exchange rates. 

 

Thanks! Any help will be appreciated 🙂

 

2 ACCEPTED SOLUTIONS
PhilipTreacy
Super User
Super User

Hi @sophie23 

Use Merge Queies to create a new table with all Rows from TableA and the Exchange Rate from TableB where the date and Currency match.  Where's there's no match you'll get a null.

In the Merge dialog box you want to choose the Join Kind : Left Outer

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

Icey
Community Support
Community Support

Hi @sophie23 ,

 

Please refer to this example:


 

(let currentCustomer = [CustomerName] in Table.SelectRows(Table1, each [CustomerName] = currentCustomer)){0}[CustomerID]
Icey_0-1614670333447.png

 

Reference: Solved: How to lookup values in another table in the Query... - Microsoft Power BI Community

 


 

Best Regards,

Icey

 

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

3 REPLIES 3
Icey
Community Support
Community Support

Hi @sophie23 ,

 

Please refer to this example:


 

(let currentCustomer = [CustomerName] in Table.SelectRows(Table1, each [CustomerName] = currentCustomer)){0}[CustomerID]
Icey_0-1614670333447.png

 

Reference: Solved: How to lookup values in another table in the Query... - Microsoft Power BI Community

 


 

Best Regards,

Icey

 

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

PhilipTreacy
Super User
Super User

Hi @sophie23 

Use Merge Queies to create a new table with all Rows from TableA and the Exchange Rate from TableB where the date and Currency match.  Where's there's no match you'll get a null.

In the Merge dialog box you want to choose the Join Kind : Left Outer

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


amitchandak
Super User
Super User

@sophie23 , refer if this blog can help

https://eriksvensen.wordpress.com/2019/02/28/powerquery-replicate-doing-an-excel-vlookup-in-m/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.