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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
jalaomar
Helper IV
Helper IV

diff % between two months

Hello,

 

I have a financial table which captures a snapshot of margin% each month and what I would like to do is calculate what was the margin previous moth compared to current month?

 

so from below screenshot between June and July the forecast Margin% deviation is 0%. 

 

anyone know how to do the calculation? have tried some calculation but they dont't give the right results.

 

jalaomar_0-1660835581193.png

 

Many Thanks!

 

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Assuming %Forecast Margin is a measure, create a Calendar Table.  In the Calendar Table, write calculated column formulas to extract Year, Month name and Month number.  Sort the Month name by the Month number.  To your visual, drag Year and Month name from the Calendar Table.  Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table.  Write this measure:

Measure = [%Forecast Margin]-calculate([%Forecast Margin],previousmonth(Calendar[Date]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi, I used a slightly different measure but would you know how to dynamically ensure that the deviation after the first month shows blank instead and not show value for current month as well?

 

so november and August should be blank in the BM% Dev. Prev. Month same for FM% Dev. Prev. month

 

jalaomar_0-1661262482182.png

 

BR

J

 

Hi,

Is your FY from November to October.  Why should the % for Aug be empty?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

My FY is from November to July. There is still no data for August, will bee seen 1st of Sep. so we will only see data up to previous month 

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Rudy_D
Resolver I
Resolver I

Hey,

 

Sorry I was out of the office for days.

 

Please find my file at this link : https://we.tl/t-CBIgkDFX4q 

 

The result is just below. Is it what you want ?

 

Rudy_D_0-1661118052648.png

 

Rudy

Rudy_D
Resolver I
Resolver I

Hi,

 

You can create the measure below :

result = sum(% Forecast Margin) - CALCULATE(sum(% Forecast Margin), PREVIOUSMONTH(Snapshot))


And than you put it in your visual.
 
Rudy

The measure didn't work unfortunatley 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors