Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Chloe19
Contributor III
Contributor III

Cumulative Formula Previous Month

Hi 

I have the below formula to give me the cumulative.

However, how would I amend it to give me the cumulative for the previous month or 2 months ago.

So regardless is I select to filter on MAY it would give me APRIL or if I filter JUN it would give me MAY

 

$(accum)Sum(TOTAL_CASH)$(/accum)

 

Thank you

(see attached what I achieved in POWER BI but I am struggling replicating in QLIK (below is the POWER BI formula)

Cummulative Cash = CALCULATE([Total Cash],FILTER(ALLSELECTED('Date'),'Date'[Date] <= MAX('Date'[Date])))

 

 

2 Replies
stevejoyce
Specialist II
Specialist II

If the date/time dimension is used in your chart, you can use rangesum(above()) which you can pass through your expression, start (t-1, t-2, etc) and end row (current row value).

https://community.qlik.com/t5/QlikView-App-Dev/Rangesum-Above-Below-and-Before-After-and-Range-Avg/m...

 

 

Chloe19
Contributor III
Contributor III
Author

Hi

Thanks for the response I tried the below, doesn't work, no result, any suggestions?

[Cash Date] is my date dimension 

aggr(RANGESUM(ABOVE($(accum)Sum(TOTAL_CASH)$(/accum), 0, ROWNO()) ), [Cash Date], (-1))