Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi,
I tried to find a solution for this problems in the forum but I couldn't.
I have 2 tables in my BI report, one is SO (Sales Orders) and another one is Exchange Rates.
In the sales orders table we have the revenue generated in a specific date (Invoice Date) and in a specific currency (Order Cur Code). I am trying to build a Dax formula to get the exchange rate for that specific date and currency in the Exchange rates table, when it is not USD. So far, what I got is:
Solved! Go to Solution.
HI @omaffud ,
You can try to use following calculate column formula to lookup closed date based on current row contents:
Formula = VAR _closedate = CALCULATE ( MAX ( 'Exchange Rates'[Effective Date] ), FILTER ( ALLSELECTED ( 'Exchange Rates' ), 'Exchange Rates'[Effective Date] <= EARLIER ( 'SO'[Invoice Date] ) && 'Exchange Rates'[To Curr] = EARLIER ( 'SO'[Order Cur Cod] ) ) ) RETURN LOOKUPVALUE ( 'Exchange Rates'[Exchange Rate], 'Exchange Rates'[Effective Date], _closedate, 'Exchange Rates'[To Curr], 'SO'[Order Cur Cod] )
Regards,
Xiaoxin Sheng
HI @omaffud ,
You can try to use following calculate column formula to lookup closed date based on current row contents:
Formula = VAR _closedate = CALCULATE ( MAX ( 'Exchange Rates'[Effective Date] ), FILTER ( ALLSELECTED ( 'Exchange Rates' ), 'Exchange Rates'[Effective Date] <= EARLIER ( 'SO'[Invoice Date] ) && 'Exchange Rates'[To Curr] = EARLIER ( 'SO'[Order Cur Cod] ) ) ) RETURN LOOKUPVALUE ( 'Exchange Rates'[Exchange Rate], 'Exchange Rates'[Effective Date], _closedate, 'Exchange Rates'[To Curr], 'SO'[Order Cur Cod] )
Regards,
Xiaoxin Sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
55 | |
53 | |
36 | |
34 |
User | Count |
---|---|
85 | |
73 | |
55 | |
45 | |
43 |