2 Replies Latest reply: Apr 7, 2016 2:10 PM by Sunny Talwar RSS

    Days vs Depth- Script

    Jared Kalmar

      Hello,

       

      I am having trouble calculating/scripting the cumulative days at a specific depth in QlikView. I currently have an sql table which pulls in the date and the depth at that specific date.  But instead of the date as a dimension I want a count of days up to that specific point.

       

      An aggr(count(Days), Dim) brings in a total count of days which does not work for my analysis.

       

      Ex:

      Current:

      Depth

         1500

         1000

           500

                 3/1/2016 | 3/2/2016 | 3/3/2016 | 3/4/2016 | 3/5/2016 |    days

       

      Goal:

      Depth

         1500

         1000

           500

              0 | 1 | 2 | 3 | 4 | 5 |    days

       

      Can someone please advise?

       

      Thanks,

      Jared