Forum Discussion
Multiple currencies conversion
Hi everyone, I am new to Power BI and I am currently learning it.
I am in this situation: I have a Sales table and a Currency table.
The Sales table has information about the sales made by various shops and the Currency table has information about exchange rates.
In the Sales table I have a currency column and a net value column:
CURRENCY NET VALUE
EUR 10
USD 5
EUR 5
RUB 7
Each net value column is in a different currency format given by the currency column, so I can't sum them.
In the Currency table:
CURRENCYFROM CURRENCYTO EXCHANGE_RATE_TYPE EXCHANGE_RATE
EUR USD 1 1,5
EUR USD 2 1,2
USD EUR 1 0,5
etc. (I am using dummy values)
For every possible conversion, I have multiple exchange rate types that must be filtered by using a slicer.
What I want to do is to convert all the net values in a specific currency format given by a slicer: so I need 2 slicers, one to select the target currency and one to select the exchange rate type. Based on this information I want to convert all the different values in a single format.
Note: the tables must be connected with the relationship between Sales(Currency) and Currency(CurrencyFrom) which leads to a many-to-many relationship.
How to deal with this problem?
I have no time dimension: the exchange rate is fixed. However, I managed to find a solution by creating some bridging tables to resolve the many-to-many relationship and then I found very helpful some dax code on https://www.daxpatterns.com/patterns/ .
2 Replies
- lbendlin
Super User
You are missing the time dimension. Currency exchange rates change over time. In business you usually use monthly exchange rates. So your FX table needs to have a month column, and your transaction table needs to have a date.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - dan094Frequent Visitor
I have no time dimension: the exchange rate is fixed. However, I managed to find a solution by creating some bridging tables to resolve the many-to-many relationship and then I found very helpful some dax code on https://www.daxpatterns.com/patterns/ .