Forum Discussion
Currency conversion
- 4 years ago
Hi KougaGennosuke ,
According to your description, you can refer to the following companies. Create three separate measures corresponding to REVENUES, LOGISTICS COST, and TAX PAID fields. Depending on the choice of currency in the slicer, the corresponding column visual is dynamically displayed.
M_REVENUES = SWITCH ( SELECTEDVALUE ( 'FX table'[Currency] ), "USD", CALCULATE ( SUM ( 'Table'[REVENUES (EUR)] ), ALLEXCEPT ( 'Table', 'Table'[Product name], 'Table'[DATE] ) ), "GBP", CALCULATE ( SUM ( 'Table'[REVENUES (EUR)] ), ALLEXCEPT ( 'Table', 'Table'[Product name], 'Table'[DATE] ) ) )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KougaGennosuke can you share sample data and the expected output.
Sure.
This is a simplified data set, for 3 products for 3 years I have the following revenues/cost:
| Product code | Product name | REVENUES (EUR) | Logistics cost (EUR) | TAX paid (EUR) | DATE |
| 9874 | ABC | 3,345,439 | 218,423 | 63,211 | 12/31/2018 |
| 1003 | XYZ | 6,248 | 1,349 | 121 | 12/31/2018 |
| 1007 | OPQ | 71,401 | 3,224 | 351 | 12/31/2018 |
| 9874 | ABC | 6,252 | 906 | 55 | 12/31/2019 |
| 1003 | XYZ | 47,252 | 1,720 | 348 | 12/31/2019 |
| 1007 | OPQ | 3,687 | 1,312 | 153 | 12/31/2019 |
| 9874 | ABC | 552,578 | 24,168 | 2,843 | 12/31/2020 |
| 1003 | XYZ | 853 | 301 | 8 | 12/31/2020 |
| 1007 | OPQ | 489,964 | 15,128 | 1,915 | 12/31/2020 |
these are very basic charts i have created to show yearly data for each product separately in EUR (data curency):
I would like to have another slicer where I can chose between EUR and USD and if I coose USD the very same graphs for one selected product is showing, just in USD.
I hope this clarifies the question 🙂