Forum Discussion
Fixed Exchange Rate
- 4 years ago
Hi,
I tried to create it in the next page in the attached pbix file.
please check the below picture and the attached pbix file.
Sales currency slicer: = SWITCH ( SELECTEDVALUE ( 'Currency Select'[Currency select] ), "Local", IF ( HASONEVALUE ( Sales[Country] ), SUM ( Sales[Sales (Local Currency)] ) ), "Euro", SUMX ( sales, CALCULATE ( DIVIDE ( SUM ( Sales[Sales (Local Currency)] ), LOOKUPVALUE ( ExchangeRate[Exchange Rate], ExchangeRate[Country], SELECTEDVALUE ( Sales[Country] ) ) ) ) ) )
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
I only created the sales amount, and I hope you can apply the same logic to Cost and Profit as well.
- Dimitris_Kats4 years ago
Helper V
First of all thank you very much for your reply! I appreciate it!!
To be honest i wanted to have only 2 selections on the currency slicer : Local and euro.
If they select local currency they will see the sales exactly in the way I have them in the sales table. If they select euro they will have the sales in euro based on the exchange rates on the second table.
Do you think this is possible?
Thank you very much again for your time and help!- Jihwan_Kim4 years ago
Super User
Hi,
I tried to create it in the next page in the attached pbix file.
please check the below picture and the attached pbix file.
Sales currency slicer: = SWITCH ( SELECTEDVALUE ( 'Currency Select'[Currency select] ), "Local", IF ( HASONEVALUE ( Sales[Country] ), SUM ( Sales[Sales (Local Currency)] ) ), "Euro", SUMX ( sales, CALCULATE ( DIVIDE ( SUM ( Sales[Sales (Local Currency)] ), LOOKUPVALUE ( ExchangeRate[Exchange Rate], ExchangeRate[Country], SELECTEDVALUE ( Sales[Country] ) ) ) ) ) )- Dimitris_Kats4 years ago
Helper V
That's amazing and exactly what i need!
Thank you so much!