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
RK_JOB
Helper II
Helper II

How to handle multiple currencies DAX

Hello,

I am opening a new thread for more clarity.

Problem statement: We want to find out the Avg. salaries in dollars for people in same position in different part of the organization (which could be in multiple countries).

From the month slicer, I need to select multiple months so I cover everyone till that moment. I have to use the latest month's exchange rate for those currencies.

For e.g.: Here I selected till Apr 2022. Table 1 is good and the dollar amount is good too in the last column.

RK_JOB_0-1667961773477.png

 


Only problem is table #2. If I do a pivot table from table 1 then answer should be $1,74,3198. How do I get that?

Here is the output I am looking for.

RK_JOB_1-1667961806168.png

 


Here is the Pbix: there is a download button:
https://drive.google.com/file/d/1zAY0UeG3ESVpB6WBwkKbinJeLfiE6TfD/view?usp=share_link

 

Here is the pivot table output: https://drive.google.com/file/d/1Ub9f8NGT3_GMbAcME8joKNR_xHLhUqiB/view?usp=share_link


Again Thanks a lot in adavance.

-EZ

 

 

 

3 REPLIES 3
kunal15sep
Frequent Visitor

  1. Use a disconnected table to store currency code & conversion rate.
  2. Use LookUpvalue to calculate the equivalent amount in required currency via calculated column.

I hope this answers your requirement.

 

 

Can you please elaborate. Have you had chance to look at the model?It won't work that way. If you look at the model, I need to look for the latest value based off of month and then sum it up the dollar amount.

Please see the below codes for calculated column:

 

Considering exchange rate for a particular point in time:

 

currencyConversion = LOOKUPVALUE(HRIS_MD_EXCHANGE_RATES[Conversion Exchange Rate],HRIS_MD_EXCHANGE_RATES[DistinctYearmonthCurrency ],HRIS_TD_COMP_WAGE_DETAIL_NEWOLD[Distinct Year Month Currency])
 
ForexAdjustedSalary = HRIS_TD_COMP_WAGE_DETAIL_NEWOLD[Salary in Loc. Currency] * HRIS_TD_COMP_WAGE_DETAIL_NEWOLD[currencyConversion]
 
 
Considering latest value as of today you'll need to fetch value for YEAR(DATE) & DAY(DATE) & LOCALCURRENCY
 
The disconnected table will have just latest date & associated key to retrieve data.

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.