YEARTODATE in Anaplan

YEARTODATE adds up a number from the start of the year to the current period and starts again each year. It works from Day to Half-Year, but not when the calendar type is Weeks: General.

By , Anaplan architect at MaxPlan and Master Anaplanner. Updated .

What is the syntax of YEARTODATE?

YEARTODATE(Line item)

The line item must be a number. The total restarts at each year start, which follows the model's calendar type.

YEARTODATE over a year end
NovDecJanFeb
Revenue10012090110
YEARTODATE, year starting in January1,1001,22090200

November's 1,100 includes 1,000 from January to October.

How do you calculate prior-year YTD?

Put the total in its own line item, Revenue YTD:

YEARTODATE(Sales.Revenue)

Then read the same line item 12 months back, in Revenue YTD prior year. This needs a monthly time scale.

OFFSET(Revenue YTD, -12, 0)

The change is one subtraction:

Revenue YTD - Revenue YTD prior year

Months in the first year return 0, the substitute value. See OFFSET, LAG and LEAD.

When does YEARTODATE not work?

Where YEARTODATE does not work
CaseClassicPolaris
Calendar type Weeks: GeneralNoNo
Time scale YearNoYes
Formula summary methodYesNo

For a year that isn't the model's year, such as a season, use CUMULATE with a Boolean that is TRUE in the first period:

CUMULATE(Sales.Revenue, Time settings.Is season start)

On a long timeline compare it with PREVIOUS. See CUMULATE vs PREVIOUS.

YEARTODATE or TIMESUM?

In a line item with Time, Planual 2.02-21 recommends YEARTODATE or MOVINGSUM over TIMESUM. For shorter totals there are MONTHTODATE, QUARTERTODATE and WEEKTODATE. Check your own model to find large TIMESUMs that should be one of these.

Sources

Check your model

Upload the line-items blueprint. The basic check runs in your browser and needs no email.

Check your model