CUMSUM
Syntax
CUMSUM (Dimension, Data, {Count})
Description
The CUMSUM function returns the cumulative sum of Data for the last Count members of Dimension. If Count is omitted, CUMSUM returns the cumulative sum of all members up to the member being calculated.
Returns
The cumulative sum of Data for the last Count members of Dimension.
If Count is omitted, CUMSUM returns the cumulative sum of all members up to the member being calculated.
Example
Suppose an analytic model contains a data cube called PROFIT that uses a dimension called MONTHS. Use the following formula to calculate the cumulative profit for all months up to the month being calculated:
CUMSUM(MONTHS, PROFIT)
Use the following formula to calculate the cumulative profit for the three months up to the month being calculated:
CUMSUM(MONTHS, PROFIT, 3)