1 Reply Latest reply: Oct 28, 2012 6:54 AM by Sunil Chauhan

# Progressive values

Hi,

I've the following table:

YEAR     MONTH     ORDER     ARTICLE     SUPPLIER     PURCH_VALUE

2012          3               A1          ART1          ABC               1900

2012          6               A1          ART1          ABC                 650

2012          8               A1          ART1          ABC                580

2012          9               A1          ART1          ABC               1000

What I'm trying to do is to calculate the PAID_VALUE in this way:

YEAR     MONTH     ORDER     ARTICLE     SUPPLIER     PURCH_VALUE     PAID_VALUE  TOTAL PAID

2012          3               A1          ART1          ABC               1900                      0                     1900

2012          6               A1          ART1          ABC                 650                    1900                  2550

2012          8               A1          ART1          ABC                580                     2550                  3130

2012          9               A1          ART1          ABC               1000                    3130                   4130

The last column represent the total paid value: choosing  June , the total paid should be 1900, in August 2550 as sum of the previous

payments and so on.

How can I create the PAID_VALUE column ? I'm getting crazy

Thanks

• ###### Re: Progressive values

use below for TOTAL PAID

if(rowno()=1,sum(PURCH_VALUE) ,PURCH_VALUE+above(PURCH_VALUE))

hope this helps