Skip to main content

Metric Formulas - Time How It Works

How Rollforwards Are Calculated

Other formulas are calculated in one pass over their scope. A rollforward cannot be, because each period's opening balance depends on the period before. This page explains how the platform runs it and what that means for publishing.

The chain is replayed period by period

The platform replays the chain period by period in date order, so each opening balance is settled before the next period needs it. All versions in scope are processed together in each period's pass. Metrics that depend on the loop wait until it has finished.

Ordinary formula:      one pass over the whole scope

                       Revenue for all 36 periods, calculated together

Rollforward:           36 passes, in order

                       P01 open -> P01 close

                                     |

                                   P02 open -> P02 close

                                                 |

                                               P03 open -> ...

                       and only then do dependent metrics run

The platform recognises the loop from the Set row against Previous on a Formula input. It replays from the earliest period in the calculation scope to the end of each version's Applicable To period.

Versions need a period range: If the versions in scope have no Applicable From / Applicable To range, the chain is not replayed period by period. Set both on every version that carries a rollforward.

Why the loop has to be declared

Execution order is worked out from the dependencies; there is no solve-order field. If B feeds C, B runs first. A rollforward is a loop, since Opening reads Closing and Closing reads Opening.

The platform accepts a loop only when it runs through a Set row against Previous on an input that is a Formula metric in the loop. Any other loop is rejected on save with “Circular reference found for below metric(s): …”. A Previous row on an Input metric only shifts the period; it does not create a loop. See Previous and Offset and How Calculation Runs.

What it costs

One pass per period in scope: A rollforward republished across three years of monthly data runs thirty-six passes. The replay always runs to the end of each version's Applicable To period, so the number of passes depends on how early the scope starts and how long that range is.

A calculation still In-Progress after the maximum run time (2 hours by default) is marked Failed. Values already written stay as they are.

Start the publish at the point of change

Earliest affected period first: Each period hands its closing balance to the next. A publish that starts after the earliest affected period leaves the periods before it stale, and their hand-off carries the stale value forward.

The platform recalculates forward from the earliest period in scope to the end of each version'sApplicable To period, so you do not need to select later periods. Start at the earliest period the change affects.

Scope options (future only, selective, or all historical and future) are on Publish Changes.

Failure in a chain is worse than failure elsewhere

If a metric fails, the run carries on: later metrics still run against the values the failed metric last held. Results already written are not rolled back, and the run ends as Failed.

In a chain it compounds: If the replay fails at period 7, periods 1 to 6 are written, period 7 is wrong or missing, and every later period is built on it. The sheet looks normal. Check the run's status in the Task Monitor (Explorer → Governance → Monitor → Task Monitor), not the sheet. On Failed, rerun from the earliest affected period. See How Calculation Runs.

What this means for design

Keep the chain short

Every metric inside the loop is replayed once per period. A named intermediate such as Goods Available for Sale helps when a period looks wrong, but each extra metric is replayed in every period too.

Plan the republish

While a metric's publish is in progress, saving that metric again is refused with “Metric Publish is in progress.” A long replay keeps the publish in progress for longer, so plan the republish outside busy periods.

Next:Limitations and Common Pitfalls — the Time-related traps.

Was this article helpful?

We're sorry to hear that.