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

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

Reply
cwnoll
Frequent Visitor

Help with MoM% change using date filter

I have a date filter on my dashboard, that is currently set at 1/1/2019(start) and 1/27/2020(end). I have a matrix with Mth-Yr in columns and data in each column. I am trying to calculate the % change in Jan 2020 to Dec 2020, but the problem is, there are only 27 days in the current month of Jan 2020. So what is the best way, or is there a way, to calculate MoM% change, given the date filter, to compare Jan 1-27 2020 to Dec 1-27 2019, instead of Dec 1-31 2019?

 

Thank you in advance

1 ACCEPTED SOLUTION
cwnoll
Frequent Visitor

Thanks all for the quick responses, but I found a solution that works. I am using the following measure to accomplish this.

 

Trans MoM Var =
VAR __PREV_MONTH =
CALCULATE([Transport MTD],DATEADD(FILTER(DATESMTD('Calendar'[Date]),'Calendar'[Date]<TODAY()),-1,MONTH))
RETURN
    DIVIDE(SUM('TD'[Transport]) - __PREV_MONTH, __PREV_MONTH)

View solution in original post

3 REPLIES 3
cwnoll
Frequent Visitor

Thanks all for the quick responses, but I found a solution that works. I am using the following measure to accomplish this.

 

Trans MoM Var =
VAR __PREV_MONTH =
CALCULATE([Transport MTD],DATEADD(FILTER(DATESMTD('Calendar'[Date]),'Calendar'[Date]<TODAY()),-1,MONTH))
RETURN
    DIVIDE(SUM('TD'[Transport]) - __PREV_MONTH, __PREV_MONTH)
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @cwnoll,

 

does it really matter?

I mean do you also consider working days?

Or how do you compare February 2019 (28 Days) to March 2019 (31 Days)?

 

Perhaps you could consider the percentage progress of the month. (27/31 = 87%)

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


amitchandak
Super User
Super User

Create a date calendar and following calculations should help, check for complete last month

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))

MTD (Year End) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFYEAR('Date'[Date])))
MTD (Last Year End) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFYEAR(dateadd('Date'[Date],-12,MONTH))))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.

Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi

https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.