Forum Discussion
Value calculation depending on the exchange rate that changes according to the years
Greetings to all,
I need your help with something. I have two different tables. One shows the costs and the other shows the average exchange rates (EUR, GBP, USD). Costs appear in EUR by default. What I want to do is, after adding a slicer to the panel, when the user chooses a different currency, I want the costs to be calculated according to the years they are in and update the tables. I seem to understand how to do it logically, but I can't put it into practice. For example, you can see the tables below.
amitchandak tamerj1 Vijay_A_Verma
This is an example of cost table(Euro)
| Year | Cost |
| 2011 | 207761 |
| 2012 | 1008972 |
| 2013 | 1625692 |
| 2014 | 1370241 |
| 2015 | 1366036 |
| 2016 | 507621 |
This Example of Currency rate
| Currency | Rate | Year |
| EUR | 1 | 2011 |
| EUR | 1 | 2012 |
| EUR | 1 | 2013 |
| GBP | 0,762468628 | 2011 |
| GBP | 0,748762364 | 2012 |
| GBP | 0,85991 | 2013 |
| USD | 1,203718431 | 2011 |
| USD | 1,109634109 | 2012 |
| USD | 1,09063 | 2013 |
Hi Anonymous
Not sure if the sample data reflets the real situation. However, based on what I have here is a solution
https://www.dropbox.com/t/z0r2hMEToZmlEg3jCost (Selected Currencey) = SUMX ( 'Currency Rate', 'Currency Rate'[Rate] * RELATED ( 'Cost Table'[Cost] ) )- Anonymous4 years ago
Hello Dear tamerj1 , yeah it works and easy to use it. I also saw this solution maybe its help other people. https://www.sqlbi.com/articles/currency-conversion-in-power-bi-reports/
2 Replies
- tamerj1Community Champion
Hi Anonymous
Not sure if the sample data reflets the real situation. However, based on what I have here is a solution
https://www.dropbox.com/t/z0r2hMEToZmlEg3jCost (Selected Currencey) = SUMX ( 'Currency Rate', 'Currency Rate'[Rate] * RELATED ( 'Cost Table'[Cost] ) )- AnonymousNot applicable
Hello Dear tamerj1 , yeah it works and easy to use it. I also saw this solution maybe its help other people. https://www.sqlbi.com/articles/currency-conversion-in-power-bi-reports/