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
Anonymous
Not applicable

Need help with doing a Cummulative to a Moving Measure

Hi - is there a way to create a Cummulative dax measure for the following already calculated Moving 8 weeks Sales Measure : 

 

Moving 8wk Sales =

CALCULATE(sum(SalesLines[Quantity]),DATESINPERIOD(Dates[Date],MAX(Dates[Date]),-56,DAY))

 

The result I wanted to achieve is in the  column D below : 

 

WKBILearner_0-1686379955765.png

 

6 REPLIES 6
Mahesh0016
Super User
Super User

@Anonymous I hope this helps you! THANK YOU!!

Cummulative 8wk Sales =
CALCULATE([Moving 8wk Sales],Dates[Month]<=MAX(Dates[Month])
Anonymous
Not applicable

Hello there - thanks for the reply. Unfortunately it gives the same results as my original "Moving 8 wks" calculation : 

Cummulative 8wk Sales =
CALCULATE([Moving 8wk Sales],Dates[Date]<=MAX(Dates[Date]))
Moving 8wk Sales =
CALCULATE(sum(SalesLines[Quantity]),DATESINPERIOD(Dates[Date],MAX(Dates[Date]),-56,DAY))
 
WKBILearner_0-1686387819724.png

 

Hii @Anonymous you have used Date[date] column in filter but look in my measure i have used Date[Month] column , Please Try that and share your views.THANK YOU!!

Anonymous
Not applicable

Hello again - I used Date[Month] - but it looks the same : 

 

WKBILearner_0-1686403685705.png

 

The Date[Month] column I have is as per below : 

 

WKBILearner_1-1686403770959.png

 

@Anonymous I hope this helps you!THANK YOU!!

Cummlative_sum =
CALCULATE ( [TotalSales], FILTER(ALLSELECTED('Date'),'Date'[Month] <= MAX ( 'Date'[Month] ) )
)

Mahesh0016_0-1686576701288.png

 

Anonymous
Not applicable

Hi again,

 

Thanks again for the help - but this time it has no result.  It looks like a Cummulative may not be possible to add onto a Measure that has a "DatesIn Period" in there..

 

Moving 8wk Sales =
CALCULATE(sum(SalesLines[Quantity]),DATESINPERIOD(Dates[Date],MAX(Dates[Date]),-56,DAY))
Cummulative 8wk Sales2 =
CALCULATE([Moving 8wk Sales],FILTER(ALLSELECTED(Dates),Dates[Month]<=MAX(Dates[Month])))
 
WKBILearner_0-1686581330305.png

 

 

 

 

 

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.