PRIOR() function
Shift data across time periods within a roll forward loop
🗒️ Description
Prior formula is the custom formula, it allows the user to fetch previous time period indicator value and the time period can be specified by the user.
The functionality of the Prior function is the same as that of the Shift function, however it is designed to work within blocks with a Roll forward time loop.
✏️ Syntax & variables
| 1 | PRIOR(indicator_name , number of periods) | 
|---|
- “Indicator name” : string. Name of the indicator to shift
- number_of_periods : number or reference to another indicator - number of periods to shift the values
✅ Expected result & examples
Forward monthly shift by 6 :
Assuming the model is monthly - the “6” indicator 2 will fetch value 6 months prior to the current month
The first 6 months of Indicator 2 are filled with 0 as the value.
Formula - Prior(“Indicator 1”, 6)

-with-space.png)