1 Reply Latest reply: Jun 26, 2013 2:12 PM by erinle211 RSS

    Error in above() function to calculate aggregate sum for previous day

      Currently I have a Straight Table that outputs 2 columns  Date and Sum_visitor using the following:

       

      1. Dimension = date

       

      2. Expression (Sum_visitor)  = aggr(sum(count_visitor), date)

       

      I also created anothe expression (Sum_visitor_prev_day) to do the same aggregate for number of visitors from the previous date with this expression:

       

      3. Expression (Sum_visitor_prev_day) = aggr(rangesum(above(sum(count_visitor),1,1)), date)

       

      Also, I did 3 loads to get the data

       

      a. First load: May 1

      b. Second load: May 2

      c. Third load: May 3-May 5

       

      I used incremental qvd to do this and concatenate everything in a cumulative QVD and load cumulative QVD into the main QVW to get the data below.

       

      I kept getting weird values for the 1st and 2nd rows in red below - the correct values that i want are in brackets. Please help!

       

      Thanks,

      Erin

       

       

      DateSum_visitorSum_visitor_prev_day
      May 12025 (0)
      May 2230 (20)
      May 31723
      May 41917
      May 52519