Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
timsaddler
Creator III
Creator III

RangeSum Question in Chart

Hi All

Struggling with the calculation of Cumulatives

As per screenshot , I need cumulatives of 8,16,24,32 for Cum Qnty

Currently I tried rangesum(above(sum(QUANTITY),0,rowno())) 

Thanks in advance

1 Solution

Accepted Solutions
timsaddler
Creator III
Creator III
Author

Thanks sunindia‌ you gave me just info to work it out myself which is great

Problem solved

View solution in original post

12 Replies
tresesco
MVP
MVP

May be like:

rangesum(above(total sum(QUANTITY),0,rowno()))

hic
Former Employee
Former Employee

I suspect that you should use

rangesum(above(total sum(QUANTITY),0,rowno()))


HIC

sunny_talwar

Won't we need a TOTAL within RowNo() as well?

RangeSum(Above(TOTAL Sum(QUANTITY),0, RowNo(TOTAL)))

timsaddler
Creator III
Creator III
Author

I'm missing something here because it still doesn't work ? do I need to do something else ?

sunny_talwar

Can you try this?

RangeSum(Above(TOTAL Sum(QUANTITY),0, RowNo(TOTAL)))

timsaddler
Creator III
Creator III
Author

Thanks that was very helpful. How do I keep the cumulative to each order no? Please see screenshot

sunny_talwar

Now this makes the the requirement a little more challenging. The problem is that TOTAL identifier within RowNo() cannot be based on certain field (although the help says it can be, but somehow it doesn't work). So now Either you need a field from your script which is sequence of number for each order, or you need to use Aggr() function. Are you using QV12? If you are then the problem can be solved much easily (The sortable Aggr function is finally here!). If not then you again will have to sort your data correctly in the script to resolve this.

In short -> Are you using QV 12? If not, then be ready to make modification to the script.

timsaddler
Creator III
Creator III
Author

Hi thanks for that. I am using Qlikview 11.2.

Can you point me in the right direction of how to do this in the script please?

An example would be great if possible.

Thanks

timsaddler
Creator III
Creator III
Author

This seems to do the trick @Sunny T

Re: Rangesum aggregation script