--- title: "PREVIOUSOF function" slug: "previousof-function" description: "Use PREVIOUSBASE to return a previous cell value in a iteration Dimension of the base Metric. You can create multi-Metric iterative calculations. " tags: ["PREVIOUSBASE", "functions ", "formula syntax", "Pigment Boards", "Pigment Blocks", "Modeling and Formulas"] updated: 2025-10-29T13:17:58Z published: 2025-10-29T13:17:58Z canonical: "kb.pigment.com/previousof-function" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.pigment.com/llms.txt > Use this file to discover all available pages before exploring further. # PREVIOUSOF function ## 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](/v1/docs/iterative-calculations-using-previousof). > > To fill another Metric with a prior Item when it’s not iterative and does not require circular referencing, see [SELECT modifier](/v1/docs/select-modifier). ## Syntax ```plaintext PREVIOUSOF(Metric [, 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 PREVIOUSOF](/v1/docs/iterative-calculations-using-previousof) for more information. Note: this Metric cannot be stored in the Security folder. | | 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'[SELECT: 'Iteration Dimension' - 1]` > [!WARNING] > ⚠️Important > > The time taken by `PREVIOUSOF` computations is affected by three key factors: > > - The number of Metrics in the configuration > - The [density](/v1/docs/how-pigment-handles-blank-cells) 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](/v1/docs/select-modifier) for alternatives that may improve performance. ## Limitations `PREVIOUSOF()` does not support [Access Rights inheritance](/v1/docs/add-remove-access-rights-inheritance#add-or-remove-access-rights-inheritance-options-at-application-level). ## See Also **Excel:** no equivalent **Related articles:** - [Iterative Calculations Across Multiple Blocks using PREVIOUSOF](/v1/docs/iterative-calculations-using-previousof) - [PREVIOUS function](/v1/docs/previous-function) - [Iterative Calculations Within a Block Using PREVIOUS](/v1/docs/iterative-calculations-using-previous)