Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hello,
I am wanting to convert each transaction value to NZD, at the selected reporting date.
I am currently getting this error, can anyone help with my dax please?
Thanks for your time
PBIX file saved here https://1drv.ms/u/s!As8wMr9_bgGrgV_K1Sal9sTZWorC?e=i2QnjE
Solved! Go to Solution.
Hi @watje255_ju ,
You may try this Measure.
FX Translation =
VAR FXTranslationDate =
MAX ( DimDate[DateKey] )
VAR SelectedCurrencyKey =
MAX ( FactAccountsReceivable[Company Key] )
VAR LookedExchangeRate =
CALCULATE (
MAX ( FactExchangeRate[Exchange Rate] ),
FILTER (
FactExchangeRate,
FactExchangeRate[Valid From] = FXTranslationDate
&& FactExchangeRate[To Currency Key] = SelectedCurrencyKey
)
)
RETURN
// SUMX( FactAccountsReceivable,
// FactAccountsReceivable[Amount Currency] /
// LOOKUPVALUE( FactExchangeRate[Exchange Rate],
// FactExchangeRate[Valid From], FXTranslationDate,
// FactExchangeRate[To Currency Key], FactAccountsReceivable[Currency Key]) )
SUMX (
FactAccountsReceivable,
FactAccountsReceivable[Amount Currency] / LookedExchangeRate
)
The result looks like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @watje255_ju ,
You may try this Measure.
FX Translation =
VAR FXTranslationDate =
MAX ( DimDate[DateKey] )
VAR SelectedCurrencyKey =
MAX ( FactAccountsReceivable[Company Key] )
VAR LookedExchangeRate =
CALCULATE (
MAX ( FactExchangeRate[Exchange Rate] ),
FILTER (
FactExchangeRate,
FactExchangeRate[Valid From] = FXTranslationDate
&& FactExchangeRate[To Currency Key] = SelectedCurrencyKey
)
)
RETURN
// SUMX( FactAccountsReceivable,
// FactAccountsReceivable[Amount Currency] /
// LOOKUPVALUE( FactExchangeRate[Exchange Rate],
// FactExchangeRate[Valid From], FXTranslationDate,
// FactExchangeRate[To Currency Key], FactAccountsReceivable[Currency Key]) )
SUMX (
FactAccountsReceivable,
FactAccountsReceivable[Amount Currency] / LookedExchangeRate
)
The result looks like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @v-cazheng-msft thank you very much!! I just changed the
VAR SelectedCurrencyKey = MAX ( FactAccountsReceivable[Company Key] )
company key to currency key and then the formula worked perfectly, thank you so much!
@watje255_ju , you lookup is giving more then one value.
Put it inside minx/maxx /Averagex
Minx(Table, <Your lookup code>)
Hi @amitchandak , thanks for your reply, could you clarify where abouts in the Dax formula?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
12 | |
10 | |
9 | |
8 |
User | Count |
---|---|
15 | |
15 | |
15 | |
12 | |
10 |