Time references
Read the previous period, a fixed period, a range of periods, or every period with square brackets after a variable name.
A plain variable name reads the value of the same period. To read a different period, put a time reference in square brackets directly after the name, such as Cash[previous]. Use time references for running balances, growth on a prior period, and rolling averages.
Positions count from 0. The first period of the model is position 0. The letter t means the period that Eigenn calculates.
Relative references
A relative reference moves with the period. In each period, it reads a period at the same distance.
| Reference | Reads |
|---|---|
Revenue | The same period |
Revenue[previous] | The period before |
Revenue[t-12] | The period 12 periods before |
Revenue[t+1] | The next period |
Revenue[this] or Revenue[current] | The same period |
A monthly growth formula:
Revenue[previous] * (1 + Monthly growth rate)Fixed references
A fixed reference reads the same period in every period.
| Reference | Reads |
|---|---|
Revenue[0] | The first period of the model |
Revenue[final] | The last period of the model |
Revenue[date(2027, 1)] | The period of January 2027 |
Ranges of periods
A range reads many periods. Write the start and the end with a colon between them. Put the range inside a function, such as sum, avg, min, or max.
| Formula | Gives |
|---|---|
sum(Revenue[t-2:t]) | The total of this period and the two periods before |
avg(Revenue[t-11:t]) | The mean of the last 12 periods |
sum(Revenue[0:2]) | The total of the first three periods |
- A range that starts before the first period uses only the periods that exist. Near the start of the model, a 12-period mean uses fewer periods.
- A range with the start after the end reads no periods.
- A range outside a function gives the error
"Revenue" reads several periods here — wrap it in sum() or avg().
Every period
Revenue[all] reads every period of the model.
- As a value, it gives the total of all periods.
Revenue[all] / 12divides the total by 12. - Inside a function, the function gets each period.
max(Revenue[all])gives the largest period value.
Actual periods only
last 3 months of actuals reads the three latest actual periods before the current period. Put it inside a function:
avg(Revenue last 3 months of actuals)The Trailing average of actuals template inserts this form.
A variable that reads itself
A variable can read its own earlier values. For a running balance, write the formula of Cash like this:
Cash[previous] + Net incomeIf a formula names its own variable without brackets, Eigenn reads the previous period. Cash + Net income on Cash gives the same result. Write [previous] anyway, because the formula is easier to read.
Cash[this] on Cash reads the same period. That gives the error A formula cannot reference itself.
Before the first period
In the first period, [previous] has no period to read. The same is true for [t-12] in the first 12 periods. The result then follows the Blanks in data setting of the variable that you read:
- Treat as blank gives a blank value.
- Treat as zero gives 0.
To set a start value, test for blank:
if Customers[previous] = blank then Starting customers else Customers[previous] + New customersThis test needs Treat as blank. The Blanks and helpers page explains blank values.
Older spellings
Older formulas can use previous month in place of [previous], and this month for the same period. Both still work. Some templates insert previous month.
Cohort references
In a model with a cohort dimension, two more references exist. [cohort] reads the period in which the current cohort starts. [t-cohort] reads the period whose position is equal to the age of the cohort. The Common cohort formulas page shows examples.