1. Calculation functions
  2. All Functions
  3. Time and Date Functions
  4. 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.

You could use YEARTODATE to compare sales from the same period of another year.

Syntax

YEARTODATE(Line item)

Arguments

ArgumentData TypeDescription
Line item to
cumulate 
Number The line item to cumulate in a yearly timeframe.

The YEARTODATE function returns a number.

Syntax example

YEARTODATE(Sales)

Constraints

  • The Time Scale of source must be Day, Week, Month, Quarter, or Half-Year.
  • This function cannot be used if model Calendar Type is Weeks: General.

Calculation engine functionality differences

In Polaris, you can use the YEARTODATE function with line items that have a matching time scale. For example, you can use YEARTODATE with a line item with a time scale of Year.

In the Classic Engine, you cannot.

Example

The example below shows YEARTODATE applied to sales, in half year increments.


H1
FY18
H2
FY18
H1
FY19
H2
FY19
H1 FY20H2 FY20H1
FY21
H2
FY21
Sales78,545 63,23967,88372,045 84,67169,22976,53267,807
YEARTODATE
(Sales)

78,545

141,784

67,883

139,928

84,671

153,900

76,532

144,339