Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

huangchao
New Contributor

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

Tags (3)
2 Replies
MVP
MVP

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

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
New Contributor

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

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

Community Browser