3 Replies Latest reply: Apr 10, 2017 3:14 PM by Sunny Talwar RSS

    Manual Accumulation with two dimensions

    Max Shevchenko

      Hi,

      How can I create the same Full Accumulation for two dimensions as QV do it?

      I use formula RangeSum(Above(TOTAL Aggr(Sum(Value1),Date),0, Date))

      But in this case Accumulation is for all fields in Example field.

       

      I need the same view like in "Accum Auto" expression.

      The data and qvw file are below.

      Thx.

       

       

      Table1:

      LOAD * INLINE [

      Example, Date, Value1, Value2

      Example1, 01/02/2017, 70, 70

      Example1, 01/04/2017, 80, 80

      Example1, 01/07/2017, 50, 30

      Example1, 01/09/2017, 30, 50

      Example2, 01/12/2017, 70, 70

      Example2, 01/15/2017, 80, 80

      ];

       

      tmp:

      LOAD

        Example,

        Date(min(Date)) as MinDate,

        Date(max(Date)) as MaxDate

      Resident Table1

      Group By Example;

       

      LOAD

        Example,

        Date(MinDate + IterNo() -1) as Date

      Resident tmp

      While Date(MinDate + IterNo() -1) <= MaxDate;

       

      DROP Table tmp;