Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Chloe19
Contributor II
Contributor II

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
Creator
Creator

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 II
Contributor II
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))