Getting Started

Formulas

Visuals & Dashboards

Managing models and collaboration

Helper variables

Helper variable

What is it?

Notes

`cohort`

creates a Cohort Category

e.g. if your model runs over 12 months then your Cohort Category has 12 cohorts

`daysinmonth`

returns the total number of days in the calendar month

e.g. useful for calculating exact rates for per-day variables

`daily rate x daysinmonth`

`fiscalmonth`

Fiscal month of the current time step. Integer between 1 and 12.

`lastActualDate`

Must have the setting toggled on, otherwise none will be returned. See here for tips on using it in formulas.â€‹

`month`

indexes the calendar months from 1-12. Jan = 1, Feb = 2 etc.

`if month = 4 then X else Y`

`none`

`if End Date = none then X else Y`

`numtimesteps`

returns the total number of time steps in the model

e.g. useful for dividing a value equally over the length of the model

`X / numtimesteps`

`quarter`

indexes the quarter from 1-4

Can be used for calculating variables that reoccur in a particular quarter, e.g.

`if quarter = 2 then X else Y`

`timestep`

or `t`

or`date`

e.g. creating a different formula for the first time step of the model

`if timestep = 0 then X else Y`

`today`

e.g. if you want to set a particular value for today, or months beyond today

`if timestep >= today then X else Y`

`year`

indexes the calendar year

Useful for setting different values/formulas for different years, e.g.

`if year = 2022 then X else Y`

Last modified 5d ago

Copy link