Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dmac1971
Creator III
Creator III

Rolling 12 Mths In Script or Expression?

I have data running back around 4 or 5 years.  I want to show the rolling 12 month totals for a measure for the last 15 months.  I have a pretty standard Calendar Script, and can get this working to a point, however the aggregation is correct for the most recent month but then wrong by increasing measure for each month backwards.

I'm trying to replicate the table below from Excel, again suspect will have to use a pivot table, hence cant use Accumulation to my knowledge?

QV Query.JPG

8 Replies
Anonymous
Not applicable

rangesum(before(total sum(yourmeasure)),0,12)

dmac1971
Creator III
Creator III
Author

Have skimmed through a number of posts including what you linked and haven't found what I'm looking for.  Robin that expression is not returing correct result.

Anonymous
Not applicable

so please post a small inline example or a sample excel input file...

MK_QSL
MVP
MVP

If you only provide screenshot, you might not get answer ever after long time.
Provide proper sample data and your expected output.

We will try to help you out on this.

dmac1971
Creator III
Creator III
Author

Yes accept that, however its not always possible to share data.  Will mock something up to see if I can get across what I am trying to achieve, thanks for your help so far.

MK_QSL
MVP
MVP

Yes I also accept that its not always possible to share data. But it's always possible to create dummy data accordingly to our applications and share here.

Anonymous
Not applicable

no example --> no solution