HomeFormulas

Helper variables

Helper variableWhat is it?Notes
cohortcreates a Cohort Categorye.g. if your model runs over 12 months then your Cohort Category has 12 cohorts
daysinmonthreturns the total number of days in the calendar monthe.g. useful for calculating exact rates for per-day variablesdaily rate x daysinmonth
fiscalmonthFiscal month of the current time step. Integer between 1 and 12.Must have Fiscal Year toggled on
fiscalyearFiscal year of the current time step.Must have Fiscal Year toggled on
lastActualDateReturns 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. Refer to our page on Last Actual Date¹
monthindexes 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
blankenables you to call "blank" variables in an if statement (see blank values here)e.g. if an employee has no end date if End Date = blank then X else Y
numtimestepsreturns the total number of time steps in the modele.g. useful for dividing a value equally over the length of the modelX / numtimesteps
quarterindexes the quarter from 1-4Can be used for calculating variables that reoccur in a particular quarter, e.g.if quarter = 2 then X else Y
timestep or t ordatereturns the time step index number of the current time stepe.g. creating a different formula for the first time step of the modelif timestep = 0 then X else Y
todayreturns the time step index number corresponding to the current datee.g. if you want to set a particular value for today, or months beyond todayif timestep >= today then X else Y
yearindexes the calendar yearUseful for setting different values/formulas for different years, e.g. if year = 2022 then X else Y

¹ Link to the page on Last Actuals - https://docs.causal.app/formulas/helper-variables/lastactualdate-variable