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
nnouchi
Helper I
Helper I

Calculate the difference in change % between a currency value over a time period

Greetings,

 

I'm looking to calculate the % difference of change of a exchange rate between dates.

 

My table structure is the following:ER.PNG

Is it possible to calculate the % change between each row in a structure of this kind in Power BI?

 

I have tried this for one single column and have been unfortunately unable to figure this out. Here's my measure I created: 

 
DIVIDE(sum('Currency Rates'[Value.CAD]) - CALCULATE(Sum('Currency Rates'[Value.CAD]),PARALLELPERIOD('Currency Rates'[Dates],-1,MONTH)),SUM('Currency Rates'[Value.CAD]),-1)
 
 
Any help would be greatly appreciated.
Thanks,
 
Nic

 

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @nnouchi,

 

Please try this measure:

% diff =
VAR currentmonthval =
    SUM ( 'Currency rates'[Value.CAD] )
VAR previousmonthval =
    CALCULATE (
        SUM ( 'Currency rates'[Value.CAD] ),
        FILTER (
            ALLSELECTED ( 'Currency rates'[Dates] ),
            MONTH ( 'Currency rates'[Dates] )
                = MONTH ( MAX ( 'Currency rates'[Dates] ) ) - 1
        )
    )
RETURN
    DIVIDE ( currentmonthval - previousmonthval, currentmonthval )

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @nnouchi,

 

Please try this measure:

% diff =
VAR currentmonthval =
    SUM ( 'Currency rates'[Value.CAD] )
VAR previousmonthval =
    CALCULATE (
        SUM ( 'Currency rates'[Value.CAD] ),
        FILTER (
            ALLSELECTED ( 'Currency rates'[Dates] ),
            MONTH ( 'Currency rates'[Dates] )
                = MONTH ( MAX ( 'Currency rates'[Dates] ) ) - 1
        )
    )
RETURN
    DIVIDE ( currentmonthval - previousmonthval, currentmonthval )

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, this is exactly what I was looking to accomplish. 

 

 

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!

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.

Top Solution Authors
Top Kudoed Authors