Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Currency Conversion using historical Conversion Table

Good evening Community!

 

I have a problem that I am finding difficult to solve.  I have read and read and read, but I can't not find a solution that works.  I am trying to do Currency Conversion for all sales of the last X years, (X can change), but there are two major considerations.  1) All data is historical, therefore has to convert into the chosen Currency based on the rate at the time of Transaction. and 2) Due to the complicated nature of the rest of my model, none of my relationships to my main dimDate table can be active.  They all have to be inactive. (i have been using USERELATIONSHIP in almost every measure dependant on date with great success)

 

I have a Sales table with all values already converted to USD. (Sample Below)

Sales_in_USDTransaction Date
1001/1/2020
42.43/5/2020
43501/5/2021

 

I also have an Exchange Rate table with the Currency, ExchangeDate and Rate. (Sample Below)

CurrencyCodeExchangeDateExchangeRate
EUR1/1/20200.89
EUR3/5/20200.88
EUR1/5/20210.9
AUD1/1/20201.2
AUD3/5/20201.2
AUD1/5/20211.1
CAD1/1/20201.11
CAD3/5/20201.13
CAD1/5/20211.2
GBP1/1/20200.9
GBP3/5/20200.97
GBP1/5/20210.91

 

What im looking to do is using a filter or slicer, allow the user to select one Currency and have all the totals convert to that currency for the time frame selected.  This will more than likely be a total number in a card, not really shown as a table. However, as mentioned before, that Sum needs to take into consideration the dates at which the transaction took place in order to convert correctly.   The ideal result would be like this....

 

If the User chose (Currency) it would show (Total)

EUR4041.312
AUD4955.88
CAD5378.912
GBP4089.628

 

Any help is greatly appreciated.  Please let me know if I need to explain any parts further (i tend to struggle on that part)

 

Thanks!

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous have relationship between these two tables on Transaction Date , it will be many to many, on relationship page set relation that "Sales filter Currency table"

 

and now add the following measure

 

SUMX ( SalesTable, CALCULATE ( SUM ( SalesTable[Amount] ) ) * CALCULATE ( MAX ( ExchangeTable[ExchangeRate] ) 

 

add slicer on Currency code and have it single select so that a currency is selected.

 

Use this new measure to get sales in the selected currency.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @parry2k ,

 

This is great. It solved 60% of my promblem. 
Just wanted to ask what is the solution is i have 30 - 35 columns. The scalability is the issue for me if the number of columns increases. 

Could you suggest any solution. 

parry2k
Super User
Super User

@Anonymous have relationship between these two tables on Transaction Date , it will be many to many, on relationship page set relation that "Sales filter Currency table"

 

and now add the following measure

 

SUMX ( SalesTable, CALCULATE ( SUM ( SalesTable[Amount] ) ) * CALCULATE ( MAX ( ExchangeTable[ExchangeRate] ) 

 

add slicer on Currency code and have it single select so that a currency is selected.

 

Use this new measure to get sales in the selected currency.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

That did the trick!  I think i was too wrapped up in the dimDate table.

 

Thank you so much!

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.