1. Calculation functions
2. All functions
3. Time and date functions

You can use time and date functions to enable time-related calculations, such as to retrieve data from different times periods.

When two line items have a different time scale, and a formula uses both, values aggregate into the greater timescale. For example, days aggregate into months and months into quarters. You can choose to skip levels. For example, you can aggregate days into quarters. Learn more in Time aggregation.

The following functions are called time series functions: CUMULATE, DECUMULATE, LAG, LEAD, MOVINGSUM, OFFSET, POST, PREVIOUS, and PROFILE. If you use line items as arguments for these functions, the source and target line items must use the same time range.

 Title Description ADDMONTHS The ADDMONTHS function adds a number of months to a date. ADDYEARS The ADDYEARS function adds a number of years to a date. CUMULATE The function CUMULATE adds values and returns a number. By default, the values are added across a time period. You can also choose to add values across a list. CURRENTPERIODEND The CURRENTPERIODEND function returns the end date from a model's current period. CURRENTPERIODSTART The CURRENTPERIODSTART function returns the start date from a model's current period. DATE The DATE function forms a date from values that represent the year, month, and day. DAY The DAY function returns the day from a date as a number between 1 and 31. If the day is blank, it returns 0. DAYS The DAYS function returns the number of days in a given time period. DAYSINMONTH The DAYSINMONTH function returns the number of days in a month you specify. DAYSINYEAR The DAYSINYEAR function returns the number of days in a year you specify. DECUMULATE The DECUMULATE function calculates the difference between the values of the current and previous periods. END The END function returns the last date of a time period. HALFYEARTODATE The HALFYEARTODATE function cumulates values from a single numeric parameter, over a half-year period. The HALFYEARTODATE cumulation starts at the Fiscal Year Start Month as selected in the Model Calendar, and resets every half-year. HALFYEARVALUE The HALFYEARVALUE function references another line item and returns the half-yearly time summary in place of the detail value. INPERIOD The INPERIOD function returns a TRUE result for a date that falls under a time period or a module's Time dimension. It returns FALSE for all other dates. LAG LAG returns a value from a period in the past. LEAD LEAD returns a value from a period in the future. MONTH The function MONTH converts a date or time period to a month in number format. MONTHTODATE MONTHTODATE cumulates values from a single numeric parameter, within a monthly time range. MONTHVALUE The MONTHVALUE function references another line item and returns the monthly time summary in place of the detail value. MOVINGSUM MOVINGSUM returns values over a changing time range. For each time range included, it aggregates the sum of values found. NEXT The NEXT function returns the value from the next period in the Time dimension. OFFSET OFFSET returns a value from a period before or after the current period. PERIOD The PERIOD function converts a date to a time period. POST The POST function pushes a value a set number of periods into the future. PREVIOUS The PREVIOUS function returns the value from the previous period in the Time dimension. PROFILE The PROFILE function multiplies values over time based on a series of numbers, or profile. The profile does not require a time dimension. QUARTERTODATE QUARTERTODATE accumulates values from a single numeric parameter, within a quarterly time range. QUARTERVALUE The QUARTERVALUE function references another line item and returns the quarterly time summary in place of the detail value. SPREAD The SPREAD function divides a value evenly over a number of time periods. START The START function returns the first date of a time period. TIMESUM Aggregates values between two time periods. WEEKDAY The WEEKDAY function converts a date to a number between one and seven, representing the day of the week. WEEKTODATE WEEKTODATE aggregates the daily values within a week from a single numeric parameter. WEEKTODATE resets after the last day of the week. WEEKVALUE The WEEKVALUE function references another line item and returns the weekly time summary in place of the detail value. YEAR The function YEAR converts a date or time period to a year in number format. YEARTODATE YEARTODATE cumulates values from a single numeric parameter, within a yearly time range. YEARTODATE resets at each yearly start date, based on Calendar Type. YEARVALUE The YEARVALUE function references another line item and returns the yearly time summary in place of the detail value.

Disclaimer

We may update our documentation occasionally, but will only do so in a way that does not negatively affect the features and functionality of the Anaplan service.