Forum Discussion
Exchange rate what-if scenario
- 4 years ago
Hi Ricardo, you are most welcome.
Question 1:
I'm guessing something is wrong with pulling in the FX Rate in the denominator. For troubleshooting, try changing the DAX to just the denominator from the DIVIDE function, so something like: RELATED('FX Rates'[Avg FX Rate] ), to make sure it's pulling in the FX rate from the other table. It should look something like this:
If you are seeing blanks still, that makes me think something is perhaps wrong with the relationship. Could you maybe send some screenshots of your relationship from the model view?
Question 2:
For sure, you could do something like below. If the currency is "USD" it divides by the value in the parameter slicer, otherwise it divides by 1.
Updated Consolidated Amount = DIVIDE ( SUM ( Amounts[Original amount] ), IF ( MAX ( Amounts[Currency] ) = "USD", 'FX Rate Parameter'[FX Rate Parameter Value], 1 ) )The results like this:
Hi Ricardo, you are most welcome.
Question 1:
I'm guessing something is wrong with pulling in the FX Rate in the denominator. For troubleshooting, try changing the DAX to just the denominator from the DIVIDE function, so something like: RELATED('FX Rates'[Avg FX Rate] ), to make sure it's pulling in the FX rate from the other table. It should look something like this:
If you are seeing blanks still, that makes me think something is perhaps wrong with the relationship. Could you maybe send some screenshots of your relationship from the model view?
Question 2:
For sure, you could do something like below. If the currency is "USD" it divides by the value in the parameter slicer, otherwise it divides by 1.
Updated Consolidated Amount =
DIVIDE (
SUM ( Amounts[Original amount] ),
IF (
MAX ( Amounts[Currency] ) = "USD",
'FX Rate Parameter'[FX Rate Parameter Value],
1
)
)
The results like this:
Hi Steve,
Your solution is working amazingly now with the IF condition, it is doing exactly what I was hoping for in my dashboard. Thank you so much for taking the time to help me out, I really appreciated it.
Wish you a great year!
Kind regards,
Ricardo