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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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)

YearCost
2011207761
20121008972
20131625692
20141370241
20151366036
2016507621

 

 

This Example of Currency rate

CurrencyRateYear
EUR12011
EUR12012
EUR12013
GBP0,7624686282011
GBP0,7487623642012
GBP0,859912013
USD1,2037184312011
USD1,1096341092012
USD1,090632013
2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

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/z0r2hMEToZmlEg3j
1.png

Cost (Selected Currencey) = 
SUMX ( 
    'Currency Rate',
    'Currency Rate'[Rate] * RELATED ( 'Cost Table'[Cost] ) 
)

2.png3.png

View solution in original post

Anonymous
Not 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/

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

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/z0r2hMEToZmlEg3j
1.png

Cost (Selected Currencey) = 
SUMX ( 
    'Currency Rate',
    'Currency Rate'[Rate] * RELATED ( 'Cost Table'[Cost] ) 
)

2.png3.png

Anonymous
Not 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/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors