14 Replies Latest reply: Nov 16, 2017 6:46 AM by Saniya Shaikh

Accumulation in Qlik Sense

Hi,

Anyone out there who knows how to accumulate a measure in a chart object in Qlik Sense. In QlikView I used to choose "Full accumulation" on the expressions tab, but there's no such feature in Qlik Sense, from what I can see...

Thanks

Pedro

• Re: Accumulation in Qlik Sense

Pedro,

It seems that "Full accumulation" is not yet implemented in Sense ( looking at the help area), however, I would guess there would be a a way by doing set analysis, hopefully someone can provide such workaround. ( sorry I am not a developer guru =(  )

Gio

• Re: Accumulation in Qlik Sense

Hi Pedro,

In Sense (as in QlikView), you can use the RANGESUM function in combination with the ABOVE function to accumulate the values you need.

In this case, you could use an expression like this:

rangesum( above( sum([Expression1]),0,rowno()))

To get this result (left: original graph; right: accumulation with RANGESUM):

• Re: Accumulation in Qlik Sense

Hey Borja,

Do you know how I can get this to work with Multiple Dimensions?

For example I have a stacked bar chart with 2 dimensions and 1 expressions, but this expression is not accumulating in QlikView Sense " rangesum( above( sum([Expression1]),0,rowno())) "

Thank you!

Ben

• Re: Accumulation in Qlik Sense

Borja,

What does the 0 mean in that equation?

rangesum( above( sum([Expression1]),0,rowno()))

• Re: Accumulation in Qlik Sense

Great Work ,

Small Question on Extension to this Question ,

What if we have 2 Expression and 2 Dimension vas well, i am trying using aggr funtion in Qlik Sense it is Not working .

I am Trying like this but not working

=Max( Aggr( rangesum( above( Sum(Aggr(sum({<No = {10}>} Expression),Filed-1,Field-2)),0,RowNo())),

Filed-1,Field-2))

Harish

• Re: Accumulation in Qlik Sense

Hi,

This is working fine.. but what If I am restricting my dimension to say top 5. in this scenario its not giving proper numbers.

Saniya.

• Re: Accumulation in Qlik Sense

Hi Pedro,

Here is a work-around that you can use for the Sense UI measures.  Try using the RangeSum and Above/Below commands.

Example:

RangeSum(Above(Sum(FieldName),0,rowno()))

Cheers,

Sean

• Re: Accumulation in Qlik Sense

Thanks Borja.  You beat me to it!

• Re: Accumulation in Qlik Sense

The RangeSum function did the trick.Thank you both ever so much for the help!

• Re: Accumulation in Qlik Sense

Hi,

Does anyone how the expression would be if it was a line chart rather than a bar chart??

I tried applying the expression above and it didn't work.

Azeem

• Re: Accumulation in Qlik Sense

Found this awesome video that explains it perfectly.

Credit to: Christof Schwarz

The basic idea is this:

1. Create 2 variables in Qlik Sense. I just used the editors variable creation window.

Variable 1:

Name:accum

Value:='RangeSum(Above('

Variable 2:

Name:/accum

Value:=',0,RowNo(TOTAL)))'

Usage:

NOTE:

If you are going to create the variable using the SET function, in the script. Then you need to change these (' ') to these (" ").

Let me know if it helped.

Nico

• Re: Accumulation in Qlik Sense

Thanks you! It's works.

• Re: Accumulation in Qlik Sense

Hi,

What if we want to have all line on the same chart?

Two dimension:

1) Year

2) Fieldname

Two mesures:

--> Sum per fieldname over the year  -> Sum(FieldName)

--> Total sales over the year.   -->  RangeSum(Above(Sum(FieldName),0,rowno()))

But standard line chart only accept one mesure. How can I solve this?