4 Replies Latest reply: May 6, 2014 8:31 AM by khadar basha RSS

    RangeSum Above using in Expression

    Gao Adam

      Hello everybody:

      I've met a problem,using rangesum and above

       

      Problem:

       

      Key       Column1         Column2            Column3

      1                2                      4                          0

      2               16                     8                          8

      3               19                    12                        15

      4               22                    16                        21

      5                5                     20                        21

       

      logical:

       

      Column2 has been accounted ,it grows 4 than row before

       

      what I need to account is Column3

      when (Column1-Column2) (ROW1) <0 Column3 is 0

      when (Column1-Column2)(ROW2~4)>0 Column3=Column1-Column2+Column3(row before)

      for example :

      row2 Column3=16-8+0=8

      row3 Column3=19-12+8=15

       

      row5 when (Column1-Column2)<0(5-20<0) Column3=0+21=21

       

      how can I use the expression to achieve the logical in vetical table?

      thanks for your help!!!