Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Cumulative Sum based on preceding rows on a grid?

Hello, so I have this grid that has two fields, one is a number of 'costs' per a 'department' lets say, and then another one for the cumulative costs as the department costs are listed under it (proceeding). Is there a script that can calculate the cumulative sum in such a way as to say in the first row take the cost, then in the second row, add both, then add all three in the third row? here's a pic for an idea!

Sum cum full will have .1647 on the first row, then the sum of (.1674+.2222) on the second row and so on!

Capture.PNG

Thank you!

Kurt

1 Reply
MVP
MVP

Re: Cumulative Sum based on preceding rows on a grid?

Create an expression like

=Rangesum( Above( Sum(costs), 0, RowNo() ))

Community Browser