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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Cumulative totals

Hi,

I have a year field which contains 100years(1915 to 2015) of data. if I select one year like 2013 it has to show the count(Contracts) for 2013,2012,2011,2010(ie last 4years of selected year) in line chart with cumulative totals.(ie 2013 shows sum(contracts ) from 1915 to 2013 and 2012 shows sum(contracts) from 1915 to 2012,...).

Thanks in advance

Best Regards

Anusha K

Labels (1)
16 Replies
Anonymous
Not applicable
Author

In my application i have 100 years of data so,accumulation function won't work for this.I have to show totals from 1915 to 2015 and 1915 to 2014 and 1915 to 2013 like this in line chart.If i select 2002 it has to show last 4years data in line chart like 2002,2001,2000,1999 with cumulatiive totals like 1915 to 2002 ,1915 to 2001,1915 to 2000 etc..

Anonymous
Not applicable
Author

Hi,

Please see attached. You can create a Cumulative Sales column in the script using peek function.

Regards,

Greeshma

Anonymous
Not applicable
Author

Its  Excellent  greeshma .Exactly meet my requirement. Thank you very much .I've to check this in my application.

Anonymous
Not applicable
Author

Hi Greeshma I have checked my application with the solution provided by you, But in my scenario I have to cumulate count of distinct id's.

I have modified your script according to that but it is not giving me the expected results( It is not cumulating the id's).

Can you please look into this...

Thanks,

Anusha.

Anonymous
Not applicable
Author

Can you provide some sample data and expected result to work on?

Anonymous
Not applicable
Author


Hi Greeshma,

Please find the attached file

Anonymous
Not applicable
Author

Hi Anusha,

Is this what you are looking for? If not, please provide expected output.

Regards,

Greeshma