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 12 months cumulative


hi,

I want cumulative of previous 12 months.

If I select april-2015 then it should cumulate values from  may-2014 to Selected month-year i.e april-2015.

plz help.

its urgent

Thanks in advance.

Labels (1)
7 Replies
sunilkumarqv
Specialist II
Specialist II

try this


Expression

=aggr( rangesum(above( sum(Value), 0, rowno() )), MONTHYEAR)


In script

load

monthYear,

Sales,

Rangesum(Sales,Peek('CumSales')) as CumSales;

Not applicable
Author

Sorry its bymistakly press as correct answer.

i want this in backend script only.

Not applicable
Author

I want this in script only

tresB
Champion III
Champion III

Read this blog post: QlikView App: Accumulate values in the Data Model

Hope that helps.

sunilkumarqv
Specialist II
Specialist II

In script


Data:

load

monthYear,

Sales,

Rangesum(Sales,Peek('CumSales')) as CumSales;

Kushal_Chawda
MVP
MVP

Use the below expression

=sum({<MonthYear={">=$(addmonths(max(MonthYear),-11))<=$(addmonths(max(MonthYear),0))"}, Year=,Month=>}Amount)

where MonthYear should be calculated using monthname(Date)

Please see the attached

qlikviewwizard
Master II
Master II

‌kajal pol:

Did you get the solutio?