6 Replies Latest reply: Jan 22, 2015 12:17 AM by vikas mahajan

# Cummulative Graph

Hi All,

Any suggestion how to show cumulative calculation  ?

Problem Statement

• I have database which has all active and exit headcount details corresponding to each month.

I am using this formula to calculate average attrition for eachmonth  : Count(Exit)/(Count(Active)/Count(Distinct MONTH))

Now i need to show cummulative attrition percenatge for each month i.e. For the month of Feburary attrition will be :

( Total Exit in January and February ) / Average( Headcount in January and February)

Similarly for March :

Total Exit in January ,February & March  )/ Average( Headcount in January ,February & March )

Thanks

Anurag Gupta

• ###### Re: Cummulative Graph

Anurag,

Is this for Qlik Sense or Qlikview development? Just want to make sure, so we can place you on the proper channels.

Gio

• ###### Re: Cummulative Graph

Hi Giuseppe,

I am currently using QlikSense

Thanks

Anurag

• ###### Re: Cummulative Graph

Hi Krish,

Regards

Anurag

• ###### Re: Cummulative Graph

After re-reading your post this may be an easier solution in Sense. This example would be your 'YTD' total Exits and you could use something similar with your average calcs:

rangesum(above(count(Exit),1,RowNo()))+count(Exit)

• ###### Re: Cummulative Graph

- let us know if you still require assistance on this - there is a very good article here http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums that explains this using QlikView - but you can use these in Sense using expressions with the Load Editor - or within the Master Items to create new measures with these calculations.

If you attach your sample data, we can get a better idea of the structure.

Using rangesum is the correct way to go as krisbalow mentioned.

I created some sample data (on what I best thought met your need and got this calculation:

sum( aggr( rangesum( above( (sum(Exit)/sum(active)),0,12) ),Month))

I am using SUM because my Exit and Active values are either 1 or 0.

Let us know.

Regards,

Mike

Qlik