Forum Discussion
Convert currency
- 10 years ago
This will work if you get rid of all of your non-GBP exchange rates. Do you need those? If you do, sure some more DAX magic can get you there.
Column = LOOKUPVALUE(ExchangeRates[ExchangeRate],ExchangeRates[CurrencyCode],"GBP",ExchangeRates[StartTime],MAX(ExchangeRates[StartTime]))
Oh wait, here is the additional DAX magic that will let you keep your other currency codes.
Column = LOOKUPVALUE(ExchangeRates[ExchangeRate],ExchangeRates[CurrencyCode],"GBP",ExchangeRates[StartTime],CALCULATE(MAX(ExchangeRates[StartTime]),ExchangeRates[CurrencyCode]="GBP"))
This will work if you get rid of all of your non-GBP exchange rates. Do you need those? If you do, sure some more DAX magic can get you there.
Column = LOOKUPVALUE(ExchangeRates[ExchangeRate],ExchangeRates[CurrencyCode],"GBP",ExchangeRates[StartTime],MAX(ExchangeRates[StartTime]))
Oh wait, here is the additional DAX magic that will let you keep your other currency codes.
Column = LOOKUPVALUE(ExchangeRates[ExchangeRate],ExchangeRates[CurrencyCode],"GBP",ExchangeRates[StartTime],CALCULATE(MAX(ExchangeRates[StartTime]),ExchangeRates[CurrencyCode]="GBP"))
I've a similar problem, in my case with nominal to constant currency....
anyway, in the proposed solution there are using the latest available exchange rate (MAX(StartTime))... i'm using it and it works fine, but can I make an slicer or use another pickable menu to change the date of the exchange rate used? What if I wish to know the price in GBP of March 1 2017?
Thanks