Referencing Time
How to reference specific Periods of a Variable
Last updated
How to reference specific Periods of a Variable
Last updated
By default Calculations reference other Variables' values from the same Period of the Model.
For instance, for a Model in Years, by default a Variable will calculate its value for 2025 by getting the values from its referenced Variables in 2025.
To make most Models useful, you will need to reference previous Periods in the Model at multiple points. You can do this using a Time Offset.
As shown in the example below, a Time Offset is indicated in a Calculation's formula by a negative number in square brackets (e.g., [-1]
) to the right of the referenced Variable name.
The number in brackets refers to the number of periods relative to the current period from which a Variable should take the referenced value. In the example above, this calculation takes the previous period's value of Gym members
.
If you reference a Variable from its own Calculation, it will automatically have a [-1]
offset applied, in order to avoid circular references.
In Models, Time Offsets must be 0 or negative. You cannot refer to future periods.
By default Calculations reference a single period of a Variable. You can choose to reference multiple or specific periods of the Model using Time Ranges.
As shown in the example below, Time Ranges are indicated in a Calculation's formula by a description in square brackets (e.g. [Starts at: First period, Ends at: Last period]
).
The above example calculates the cumulative revenues since the beginning of the Model. In this case, the Time Range for the Revenues
Variable starts at the first period of the model, and ends at the current period.
Time Ranges are particularly useful when creating Metrics, which summarise information about the Model as a whole. When you refer to a Variable from a Metric, by default it will reference the entire Model time range.
When you use a Time Range from within a Variable, you should take care not to reference future Periods, as this will lead to Calculation errors.
When creating a Time Range, you can define any two of:
Start period
Duration
End period
At least one of these parameters must be set to Auto
. If all three are set to Auto
, the reference will refer to the current period.
The Start and End periods can be defined as below:
Auto
Refers to current period
Fixed period
Refers to a specific period (e.g. June 2023
)
Periods from start
Refers to a period that is a defined number of periods after the start. First period = 1
Periods from end
Refers to a period that is a defined number of periods before the end. Last period = 1
Duration can be defined as Fill
, which will be the number of periods between the Start and End periods, or # of Periods
(a defined number of periods).
For instance, if the Start Period is defined as the First Period, and the End Period is Auto (Current Period), the duration will be the number of periods between the first period and the current period.
There are two ways of editing the Time Offset and Range.
Shortcut buttons in Calculation Part list
Calculation Part editing dialog
As in the example above, each Periods or Variable Reference Calculation Part displays a shortcut button which can be pressed to show a list of actions to change the Time Offset or Time Range.
Press the Reset button at the bottom of the list to revert to a the default single current period reference.
Detailed properties of any Calculation Part can be edited through a wizard as in any list view.
In the Calculation Part wizard, navigate to the Reference Range step, where you can edit the Offset and Range properties manually, as shown in the example below.
The Reference Range step is only available for Variable and Period References