Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
huangchao
Contributor III
Contributor III

how to create result with sum above cumulative value of same column?

Hi guys, your help are appreciated!

I have date set attached and i want to create a new column which need to use above rows cumulative value of that same column, i am stuck doing it in neither script or expression, any help?

rolling calculation in same column.png

2 Replies
sunny_talwar

Would you be able to share a sample where you are trying to do this? or may be share your Excel file with the raw data and the expected output you want to see

huangchao
Contributor III
Contributor III
Author

Hi,

KEY is main dimension

Month is time dimension

logic is:

1.for each KEY, if Month is past month then wanted result is 0

2.for each KEY, if Month is equal or larger than current month, then depending on Balance value (<0 or >=0) to use different calculation way (details in attached file)

most hard part to me is using cumulative value of above rows as a input for next row, in excel it's easy.

regards/HC