Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. 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
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
78 | |
74 | |
70 | |
49 | |
41 |
User | Count |
---|---|
56 | |
47 | |
33 | |
32 | |
28 |