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 Nikolai Starostin, Anaplan architect at MaxPlan and Master Anaplanner. Updated .
What is the syntax of YEARTODATE?
The line item must be a number. The total restarts at each year start, which follows the model's calendar type.
| Nov | Dec | Jan | Feb | |
|---|---|---|---|---|
| Revenue | 100 | 120 | 90 | 110 |
| YEARTODATE, year starting in January | 1,100 | 1,220 | 90 | 200 |
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:
Then read the same line item 12 months back, in Revenue YTD prior year. This needs a monthly time scale.
The change is one subtraction:
Months in the first year return 0, the substitute value. See OFFSET, LAG and LEAD.
When does YEARTODATE not work?
| Case | Classic | Polaris |
|---|---|---|
| Calendar type Weeks: General | No | No |
| Time scale Year | No | Yes |
| Formula summary method | Yes | No |
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:
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.