Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling N Months Calculation

Hello,

I have a table like this:


JanFebMarAprMay
Amount120232302322382

When I select Apr, the Pivot Table only shows:


Apr
Total = Sum(Amount)322

How could I make Total to be sum of Feb's, Mar's and Apr's amount, i.e. rolling 3 months, and giving out 856, i.e. 232 + 302 + 322?

Please help and advise. Thank you.

Labels (1)
3 Replies
er_mohit
Master II
Master II

See the attached file

Not applicable
Author

Hello,

Thanks for your help. However, is there a way I could hide the previous months? For example, if I select Apr and May, Feb and Mar would be hidden, however, Apr and May could still show the accumulated total. Is that possible? Please help and advise. Thank you.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See this document for some solutions: Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand