COMING SOON
Description
Returns the value of the previous cell in the iteration Dimension of any Metrics defined in the iterative calculation configuration. This function allows you to create multi-Metric iterative calculations.
For more information on how to create iterative calculations involving multiple Blocks, see Iterative Calculations Across Multiple Blocks using PREVIOUSOF.
To fill another Metric with a prior Item when it’s not iterative and does not require circular referencing, see SELECT modifier.
Syntax
PREVIOUSOF(Metric M, Offset])
Arguments
Argument | Type | Dimensions | Descriptions |
---|---|---|---|
Metric | Any | Any Dimension included in the Metric structure | The Metric on which you want to take the value of the previous cell in the iteration Dimension. Only Metrics defined in the iterative calculation settings are considered. See Iterative Calculations Across Multiple Blocks using PREVIOUSBASE or PREVIOUSOF for more information. |
Offset | Integer or Metric | No Dimension or same as the Metric | Number of cells to offset. |
Returns
Type | Dimensions |
---|---|
Same as the Metric referenced within the function | Same as the Metric referenced within the function |
Examples
Formula | Description |
---|---|
| Returns the previous month value of the ‘Ending Inventory’ Metric with Month selected as Iteration Dimension. |
Equivalent in Pigment (if not iterative and does not require circular referencing): 'Metric'gSELECT: 'Iteration Dimension' - 1]
Important
The time taken by PREVIOUSOF
computations is affected by three key factors:
- The number of Metrics in the configuration
- The density of Metrics in the configuration
- The size of the iterating Dimension
As these decrease, performance improves. PREVIOUSOF
should only be used if there is a need for circular referencing in the model. See SELECT modifier for alternatives that may improve performance.
Limitations
PREVIOUSOF()
does not support Access Rights inheritance.
See Also
Excel: no equivalent
Related articles: