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.
fiscalyear
Fiscal year of the current time step.
lastActualDate
Returns the time step index number of the time step of the Last actual date setting.
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.
Useful for seasonality, or any variables that occur on a particular month each year.
if month = 4 then X else Y
none
enables you to call "none" variables in an if statement (see none values)
e.g. if an employee has no end date - see Empty Value in formatting variable options
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 ordate
returns the time step index number of the current time step
e.g. creating a different formula for the first time step of the model
if timestep = 0 then X else Y
today
returns the time step index number corresponding to the current date
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
Copy link