---
title: "Helper Variables"
description: "In this article you will find the available helper variables for formulas in Lucanet xP&A."
source_url: https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/create-andedit-formulas/helper-variables
language: en
last_updated: 2023-08-16
---
# Helper Variables in Formulas

## Overview

In this article you will find the available helper variables for formulas in Lucanet xP&A.

## Available Helper Variables

The following helper variables are available for formulas in xP&A:

| Helper variable | Description |
|---------|---------|
| cohort | Creates a Cohort Dimension. |
| daysinmonth | Returns the total number of days in the calendar month. |
| fiscalmonth | Fiscal month of the current time step. Must be an integer between 1 and 12. |
| fiscalyear | Fiscal year of the current time step. Must have Fiscal Year toggled on. |
| lastActual​Date | Returns the time step index number of the time step of the [Last Actual Date setting](https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/working-with-time/last-actual-date.md). Must have the setting toggled on in the [time settings of a model](https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/working-with-time.md), otherwise none will be returned. See [lastActualDate](#lActualdate) for more information. |
| 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**. |
| blank | Enables you to call **blank** variables in an if statement. E.g. if an employee has no end date: **if End Date = blank 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 date | 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**. |

## lastActualDate

**lastActualDate** is a helper variable that returns the timestep of the [Last Actual Date setting](https://support.lucanet.cloud/en/documentation/xp-a---extended-planning-and-analysis/modeling-your-data/working-with-time/last-actual-date.md), if it is toggled on.

This is useful:

- If you want to forecast variables using historical averages e.g. average your new users for the last 3 months of actuals/historicals.

Forecast Variables based on historical average values

- Or for having a different formula for your forecast months vs. your ‘actual’ or historical months. E.g. for a **Churn %** variable, you might want to calculate the actual churn percentage in historical months, but for forecast months this might be an input based off of other variables.

LastActualDate to calculate the churn.
