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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
JulieGueho
Regular Visitor

Month over month calculations with Dates table

I don't understand how the time intelligence functions are working.

 

I created two measures

Sales July 2015 = CALCULATE(SUM(Revenue), DATESBETWEEN(Dates[Date], DATE(2015,7,1), DATE(2015,7,31)))

Sales Previous Month = CALCULATE([Sales July 2015], PREVIOUSMONTH(Dates[Date]))

 

Problem: Sales July 2015 gives the same result than Sales Previous Month

 

If I do: Sales Previous Month = CALCULATE([Sales July 2015], PREVIOUSMONTH(DATESBETWEEN(Dates[Date], DATE(2015,7,1), DATE(2015,7,31))))

it works fine.

 

I don't get how the time intelligence functions are working. What am I missing??

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

PREVIOUSMONTH returns all dates from the previous month based on the first value in the dates column, so I am guessing that your first date is August so it is dumb luck that it is the same as your July?

 

 

 

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
DominikPetri
Advocate V
Advocate V

Why don't you use DATEADD to shift the dates 1 months back?

Try this:

Sales Previous Month = CALCULATE([Sales July 2015], DATEADD( Dates[Date], -1, MONTH ) )

 

Best regards

Dominik Petri.

 

Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
Greg_Deckler
Community Champion
Community Champion

PREVIOUSMONTH returns all dates from the previous month based on the first value in the dates column, so I am guessing that your first date is August so it is dumb luck that it is the same as your July?

 

 

 

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 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.