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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Percentage change Present month and previous month

Hi All,

 I want to calculte the previous month and present month sales . Also  i wanted to  calucate percentage change. 

 

Kindly provide me the steps or sample pbix

 

Regards,

Ranganna Naik

2 REPLIES 2
Anonymous
Not applicable

// Assumption is you have a custom-made calendar
// that holds the required pieces of time, among others,
// months. The Date field stores datetimes and is
// the key to the table. The table is also marked
// as the Date table in the model. Each indiviual month
// has a unique MonthId that runs from 1 to the number
// of months in the calendar (not just 12, we're talking
// about different months throughout years).

[Measure PM] =
IF( HASONEVALUE( Calendar[MonthId] ),

	CALCULATE(
		[Measure],
		DATEADD( Calendar[Date], -1, MONTH )
	)
)

[Measure MoM%] =
IF( HASONEVALUE( Calendar[MonthId] ),

	var __currentValue = [Measure]
	var __priorMonthValue = [Measure PM]
	var __delta = __currentValue - __priorMonthValue
	return
		divide(
			__delta,
			__priorMonthValue
		)
)

 

Best

D

harshnathani
Community Champion
Community Champion

HI @Anonymous ,

 

Have a look at this article

 

https://powerbi.tips/2016/07/measures-month-to-month-percent-change/

 

Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.