Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.

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

tresesco
MVP
MVP

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

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?