Returns the cumulative sum of a ValueColumn, or
returns the cumulative sum of a ValueColumn according to a certain sort order.
Syntax
CUM(ValueColumn)
CUM(ValueColumn, SortColumn)
Input
ValueColumn | is a value column |
Domain type: | any Value domain |
SortColumn | is a column on which you wish to sort before calculating the cumulative sum |
Output
CUM returns: | a value |
Domain: | system domain Value |
Note:
When a value in the input column is undefined, the record is excluded from the calculation.
Tips:
Usable in
Examples
TabCalc example:
OutCol1 = CUM(InCol)
OutCol2 = CUM(InColA, InColB)
InCol |
OutCol1 |
InColA |
InColB |
OutCol2 |
|
-5 |
-5 |
-5 |
Commercial |
-2 |
|
-2 |
-7 |
-2 |
Commercial |
-3 |
|
-1 |
-8 |
-1 |
Industrial |
5 |
|
0 |
-8 |
0 |
Institutional |
16 |
|
? |
? |
? |
Institutional |
11 |
|
4 |
-4 |
4 |
Recreational |
20 |
|
8 |
4 |
8 |
Residential |
? |
|
9 |
13 |
9 |
Residential |
24 |
|
11 |
24 |
11 |
Residential |
24 |
See also:
AVG | |||
STD | |||
STDEV | COVAR | Cumulative Column | |
STDERR | CORR |