Forum Discussion
Currency Conversion
Thank you to all who reply.
I need to convert my sales revenue USD over to EUR and also be able to switch back to USD.
Conversion table "HistoryExchangeReport".
| Date | Rate | ISO Code From | ISO Code To |
| 2/23/2022 | 0.825355 | EUR | USD |
| 2/23/2022 | 1.2116 | USD | EUR |
How could I create the measure to use with a slicer to toggle back and forth?
Thanks!!
BLD
- Anonymous4 years ago
Thank you for responding!,
I've got my issue resolved. Thank you for your response. I was unable to find a way to attach the sample .pbix file so see code below for what is working.
Converted Sales =VAR _CurrencySelected = [Currency Selected]VAR _Sales = [Total Sales]VAR _Rate =LOOKUPVALUE(FactCurrencyRates[Crossrate],FactCurrencyRates[Ticker], _CurrencySelected)var _ConvertedMeasure = _Sales * _RateRETURN_ConvertedMeasureFinally what I am struggling with is finding a way to show the EURO sign when selected. Right now it would still display the USD dollar sign $ for Euros. Difficult trying to format for euro.
4 Replies
- lbendlinSuper User
Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck? How do you envision the visuals to work?
- AnonymousNot applicable
Thank you for responding!,
I've got my issue resolved. Thank you for your response. I was unable to find a way to attach the sample .pbix file so see code below for what is working.
Converted Sales =VAR _CurrencySelected = [Currency Selected]VAR _Sales = [Total Sales]VAR _Rate =LOOKUPVALUE(FactCurrencyRates[Crossrate],FactCurrencyRates[Ticker], _CurrencySelected)var _ConvertedMeasure = _Sales * _RateRETURN_ConvertedMeasureFinally what I am struggling with is finding a way to show the EURO sign when selected. Right now it would still display the USD dollar sign $ for Euros. Difficult trying to format for euro.
- v-kkf-msftCommunity Support
Hi Anonymous ,
Please try the following formula:
Measure = VAR LatestDate = MAXX ( ALLSELECTED ( 'Rate Table' ), 'Rate Table'[Date] ) VAR LatestRate = CALCULATE ( SELECTEDVALUE ( 'Rate Table'[Rate] ), FILTER ( ALLSELECTED ( 'Rate Table' ), 'Rate Table'[Date] = LatestDate ) ) VAR Sales = SUM ( 'Sales Table'[Amount] ) RETURN IF ( SELECTEDVALUE ( 'Rate Table'[ISO Code To] ) = "USD", Sales, Sales * LatestRate )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicable
Thank you Winniz,
I've got my issue resolved. Thank you for your response. I was unable to find a way to attach the sample .pbix file so see code below for what is working.
Converted Sales =VAR _CurrencySelected = [Currency Selected]VAR _Sales = [Total Sales]VAR _Rate =LOOKUPVALUE(FactCurrencyRates[Crossrate],FactCurrencyRates[Ticker], _CurrencySelected)var _ConvertedMeasure = _Sales * _RateRETURN_ConvertedMeasureFinally what I am struggling with is finding a way to show the EURO sign when selected. Right now it would still display the USD dollar sign $ for Euros. Difficult trying to format for euro.
Thanks!!