Skip to main content

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
(required)

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
(optional)

Integer or Metric

No Dimension or same as the Metric

Number of cells to offset.
If an integer is chosen, the default value is: 1
If a Metric is chosen, it can have the same Dimensions as the current Metric or fewer.

 

Returns

 

Type

Dimensions

Same as the Metric referenced within the function

Same as the Metric referenced within the function

 

Examples

 

Formula

Description

PREVIOUSOF('Ending Inventory')

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:

  1. The number of Metrics in the configuration
  2. The density of Metrics in the configuration
  3. 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:

Be the first to reply!

Reply