Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
In the Excel table "Purchases" I want to add a New column where I use the Date row to lookup an exchange rate in the "Exchange Rates" table and calculate the new currency cost column based on the original currency and the exchange rate.
My challenge is that purchase lines may be registered on any date, but the exchange rates are not available for weekends and holidays dates. You can see that there is a purchase row registered on the date 03.08.2019, but there is no exchange rate available for that date in the "Exchange Rate" table because this is a Saturday.
Can you please help me how to solve this in Power Query / M language?
Solved! Go to Solution.
@Anonymous
Try this new custom column
=let mydate=[Date] in Table.Max( Table.SelectRows(#"Exchange Rates",each [Date] <= mydate),"Date")[Rate]
@Anonymous
Try this new custom column
=let mydate=[Date] in Table.Max( Table.SelectRows(#"Exchange Rates",each [Date] <= mydate),"Date")[Rate]
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 5 | |
| 5 | |
| 3 |