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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Br1-981
Helper I
Helper I

Measure to convert currency

Hi,

I have a fact table:

Br1981_1-1706700981009.png

 

where sales values are in local currency and I need to convert into GBP using a custom table monthly based:

Br1981_0-1706700952002.png

I Would create a measure that for each combination of country/year/month gives me the result of sales*exchange rate

 

I created a calculated column in DAX:

 

 

Cost in EUR = 
VAR CurrentMonth = Fact[MONTH]
VAR CurrentYear = Fact[YEAR]
VAR CurrentCountry = Fact[COUNTRY]
VAR ExchRate =
    LOOKUPVALUE (
        'ExRate'[EXCHANGE RATE TO GBP],
        'ExRate'[YEAR], CurrentYear,
        'ExRate'[MONTH], CurrentMonth,
        'ExRate'[COUNTRY], CurrentCountry
    )
RETURN
    Fact[SALES  LOCAL CURRENCY] * ExchRate

 

but I'm worried about performances


Thanks

 

 

1 ACCEPTED SOLUTION

Thanks, starting from your approach I developed a new measure:

SPEND_EUR = 
VAR CurrentMonth = MONTH(Data[Date])
VAR CurrentYear = YEAR(Data[Date])
VAR CurrentCountry = Data[Country_Code]
VAR ExchRate =
    LOOKUPVALUE (
        'ExRate'[Exchange Rates],
        'ExRate'[Year], CurrentYear,
        'ExRate'[Month], CurrentMonth,
        'ExRate'[Country_Code], CurrentCountry
    )
RETURN
    WeeklyData[SPEND] * ExchRate

View solution in original post

2 REPLIES 2
amustafa
Solution Sage
Solution Sage

See my solution in this post:

 

Re: Exchange Rate Conversion with Date Selection (... - Microsoft Fabric Community

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks, starting from your approach I developed a new measure:

SPEND_EUR = 
VAR CurrentMonth = MONTH(Data[Date])
VAR CurrentYear = YEAR(Data[Date])
VAR CurrentCountry = Data[Country_Code]
VAR ExchRate =
    LOOKUPVALUE (
        'ExRate'[Exchange Rates],
        'ExRate'[Year], CurrentYear,
        'ExRate'[Month], CurrentMonth,
        'ExRate'[Country_Code], CurrentCountry
    )
RETURN
    WeeklyData[SPEND] * ExchRate

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.