11 Replies Latest reply: Aug 18, 2017 2:26 PM by Chaitanya Moparthi RSS

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

    Chaitanya Moparthi

      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.