Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulative sum graph

Dear community,

I want to create a graph where I am showing weeks along the bottom, then the expression is a sum of all field values where the date is less than the week being shown (for all data).

The complication is, I only want to show data for the previous 13 weeks - but the sum needs to include all previous weeks...

Current expression is:

=sum(if(collectdate<=Variable AND Category='Stock Value',tlNetValueCalculated))

Hopefully this makes sense.

Best regards,

Drew

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

have a look at the attached sample.

hope this helps

--Edited--

View solution in original post

2 Replies
tracysmart
Creator II
Creator II

Hi Drew

You are probably going to have to use rangesum and the above function here.

so something like rangesum(above(yourexpression),1, rowno())

You might also need to use the aggr function to calculate over the whole Week dimension.

if you can send an example app it would be easier to help

Frank_Hartmann
Master II
Master II

have a look at the attached sample.

hope this helps

--Edited--