Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

add up daily values in a column and get cumulative sum column

Hi Team,


I have a table like this with only daily number. I want  insert a 'cum' column which has daily values added up till date.

When I load while loading file I am getting 'above' is invalid error.

DatedailynoCum
07-01-20171010
07-02-20172030
07-03-20174070
07-04-201730100
07-05-201720120
07-06-201730150
07-07-201720170
07-08-201710180
07-09-201740220
07-10-201720240

rangesum(above(dailyno),0,rowno())) did not work for me.

Here is how I tried this.

LOAD

date,

dailyno

FROM [lib://main (qlik_admin)/dailydata.qvd]

(qvd);

I have loaded extra coloumn, it did not work


LOAD

date,

dailyno,

rangesum(above(dailyno),0,rowno()))

FROM [lib://main (qlik_admin)/dailydata.qvd]

(qvd);

The help is appreciated. Thank you.

11 Replies
Anonymous
Not applicable
Author

Hey Chanin, The above function won't be accepted in the data load. It is accepted only in the expression. But thanks for your reply. I appreciate the help.

Anonymous
Not applicable
Author

Thanks for all the replies guys and I marked the correct answer.

Please you can not use 'Above' in the load script as it will throw an error. 'Peak' works well. Thanks.