ROLLFWD() function
For rolling balances along time
Simon Ritchie
Last Update hace 2 meses
It is designed to allow time-spiralling behaviour often seen in values that represent balance numbers over time (eg cash balance, or employee headcount).
The roll forward function will be calculated period by period, so that it does not create a circular reference.
For other formulas that you try to write within Blox the system will check to make sure you didn't create a circular reference, and it will alert you if you do. The rollfwd is an exception to this because we are rolling a balance from one period to the next.
The intended use of this function is as the āOpening balanceā or āCarried / forwardā balance.
The starting value is an Optional argument for when you want to add a starting value in the first period of the time dimension - e.g. Opening cash balance, Opening customer count etc
āindicator nameā : string. Name of the indicator to roll forward a period - Must be another indicator in the same block
starting value (optional) : number (float) or string. Value to start with in the first period. Defaults to 0 if nothing is passed, Can also reference another indicator that contains a number to use as the opening balance.
With no starting value - starting at 0
Indicator | Formula | Jan | Feb | Mar |
Opening balance | rollfwd('Closing balance') | 0 | 500 | 1100 |
Cash in | Input | 1000 | 1200 | 1600 |
Cash out | Input | 500 | 600 | 700 |
Closing balance | āOpening balanceā + āCash Inā - āCash Outā | 500 | 1100 | 2000 |