4 Replies Latest reply: Apr 21, 2017 9:15 AM by LAURENT CLOATRE RSS

    Calculation by each date

    Max Shevchenko

      Hi,

       

      Table1:

      LOAD * INLINE [

      Group, Date, Value1

      Group1, 01/01/2017, 100

      Group1, 01/04/2017, 0

      Group1, 01/05/2017, 0

      Group1, 01/07/2017, 30

      Group1, 01/10/2017, 0

      ];

       

      I need create calculation by each date something like this

      =Previous(Value1)+Value1-Previous(Value1)/(Days-1)

       

      As result

      Group, Date, Value1

      Group1, 01/01/2017, 90

      Group1, 01/02/2017, 80

      Group1, 01/01/2017, 70

      Group1, 01/04/2017, 60

      Group1, 01/05/2017, 50

      Group1, 01/06/2017, 70

      Group1, 01/07/2017, 52.5

      Group1, 01/08/2017, 35

      Group1, 01/09/2017, 17.5

      Group1, 01/10/2017, 0

       

      Thx.