Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

dmac1971
Contributor II

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
roharoha
Valued Contributor III

Re: Rolling 12 Mths In Script or Expression?

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

Re: Rolling 12 Mths In Script or Expression?

dmac1971
Contributor II

Re: Rolling 12 Mths In Script or Expression?

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.

roharoha
Valued Contributor III

Re: Rolling 12 Mths In Script or Expression?

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

Re: Rolling 12 Mths In Script or Expression?

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

Re: Rolling 12 Mths In Script or Expression?

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.

Highlighted

Re: Rolling 12 Mths In Script or Expression?

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.

roharoha
Valued Contributor III

Re: Rolling 12 Mths In Script or Expression?

no example --> no solution

Community Browser