Financial and operational planning often relies on complex cycles in which several metrics interact from one period to the next. How can these interdependencies be managed without creating errors or infinite loops? This is precisely the challenge addressed by Pigment, which has just introduced a new function: PREVIOUSOF.
Designed as an evolution of the PREVIOUS function, already familiar to users, PREVIOUSOF enables iterative calculations across several blocks (metrics). Put simply, it makes it possible to build models in which different metrics—such as opening inventory, replenishments or sales—depend on one another month after month, without the platform being blocked by circular dependencies.
A concrete example: inventory management
Let us imagine an inventory planning scenario:
the opening inventory of a month depends on the closing inventory of the previous month,
the closing inventory, in turn, depends on the month's inflows and outflows,
and replenishments depend, once again, on the previous month's closing inventory.
With conventional methods, this cycle would create a loop that is impossible to calculate. Thanks to PREVIOUSOF, Pigment performs these calculations seamlessly, taking each dependency into account in logical order.
An innovation that combines power and control
This new function is particularly useful for:
avoiding circular reference errors,
modelling complex financial or operational scenarios,
optimising performance by focusing only on essential metrics.
Pigment also provides debugging tools and technical safeguards (limited to 10 metrics per cycle, maximum iteration dimension size), ensuring controlled use.
source: community.pigment.com
