Reference Updated April 8, 2026

YTD

Category: Rollforward & time series

Overview

The YTD function returns year-to-date values by calculating a running sum per year over the lowest available time level. The cumulative sum resets at the start of each new year. Missing periods within a year are filled with the last cumulative value; missing periods at the start of a year are not filled.

Use this function when you want cumulative values within each year that reset at the start of a new year.

Syntax

YTD('Node')

Example usage: YTD('Revenue')

Parameters

ParameterDescriptionTypeRequired
NodeInput node, specified using the node name in single quotes (e.g.'Revenue')Node referenceYes

Output Shape

AspectBehavior
DimensionalitySame as input.
Time rangePeriods within a year are filled forward from the first available value to the end of the year. Missing periods at the start of a year are not filled. Years with no data at all are not included.
ValuesCumulative sum within each year. Resets to zero at the start of each new year.
Row countExpanded. Gaps within a year are filled, but completely empty years remain absent.

Watch Out

  • The input must have a time level that is at least as fine as Quarter (Quarter, Month, or finer). Year-level input is not sufficient.
  • Missing periods at the start of a year are not filled. For example, if Q1 is missing but Q2 has data, the YTD starts from Q2.
  • Missing periods within or at the end of a year are filled with the last cumulative value. For example, if Q3 is missing, Q3 and Q4 carry forward the Q2 cumulative total.
  • This function forces the time dimension level links to match the dimension management configuration. Do not use this function if you want the node to have different level links than the dimensions.
  • The related functions QTD (Quarter-to-Date), MTD (Month-to-Date), and WTD (Week-to-Date) work the same way but reset at the start of each quarter, month, or week respectively. WTD is only available on projects that use the week dimension.

Examples

YTD with Missing Quarters

This example shows the year-to-date accumulation over quarters, including how missing quarters inside a year are filled with the latest cumulative value while missing quarters at the start of a year are not added.

Input node: Profit

YearQuarterValue
20252025-Q1150
20252025-Q2200
20252025-Q3250
20262026-Q2100
20262026-Q350
20262026-Q4120
20272027-Q1100
20272027-Q2120
20272027-Q4140

Formula: YTD('Profit')

YearQuarter→ YTD Result
20252025-Q1150
20252025-Q2350
20252025-Q3600
20252025-Q4600
20262026-Q2100
20262026-Q3150
20262026-Q4270
20272027-Q1100
20272027-Q2220
20272027-Q3220
20272027-Q4360

2025-Q4 was filled with the cumulative sum (600) because Q3 was the last quarter with data. 2026-Q1 is not in the result because it was missing at the start of the year. 2027-Q3 carries forward the Q2 cumulative (220) because Q3 had no input data.

YTD Across Multiple Dimensions

This example shows how YTD behaves across multiple dimensions with gaps within a year, fully empty years, and a broader project horizon.

Input node: ProfitMultiDim

ProductYearQuarterMonthValue
A20252025-Q42025-1050
A20252025-Q42025-1130
A20262026-Q12026-0130
A20262026-Q12026-0240
A20262026-Q42026-11110
A20272027-Q12027-0130
A20272027-Q12027-0250
B20252025-Q42025-1120
B20252025-Q42025-1260
B20262026-Q12026-0370
B20262026-Q42026-11130
C20252025-Q42025-1280
C20272027-Q12027-02100
D20262026-Q12026-0240
D20272027-Q12027-0160
D20272027-Q12027-0370

Formula: YTD('ProfitMultiDim')

Project Horizon: 2024 to 2029

ProductYearQuarterMonth→ YTD Result
A20252025-Q42025-1050
A20252025-Q42025-1180
A20252025-Q42025-1280
A20262026-Q12026-0130
A20262026-Q12026-0270
A20262026-Q1 to 2026-Q42026-03 to 2026-1070
A20262026-Q42026-11180
A20262026-Q42026-12180
A20272027-Q12027-0130
A20272027-Q12027-0280
A20272027-Q1 to 2027-Q42027-03 to 2027-1280
B20252025-Q42025-1120
B20252025-Q42025-1260
B20262026-Q12026-0370
B20262026-Q2 to 2026-Q42026-04 to 2026-1070
B20262026-Q42026-11200
B20262026-Q42026-12200
C20252025-Q42025-1280
C20272027-Q12027-02100
C20272027-Q1 to 2027-Q42027-03 to 2027-12100
D20262026-Q12026-0240
D20262026-Q1 to 2026-Q42026-03 to 2026-1240
D20272027-Q12027-0160
D20272027-Q12027-0260
D20272027-Q12027-0370
D20272027-Q2 to 2027-Q42027-04 to 2027-12130

Key observations:

  • All products keep their first value unchanged; nothing is added before the first data point in each year.
  • All periods with at least one value are filled forward until the end of the year.
  • Completely empty years are left out (e.g. B for 2027, C for 2026).
  • No values for 2028 and 2029 (end of horizon) are added, as these would be new years with no data.

FunctionWhen to use instead
QTDWhen the cumulative sum should reset every quarter instead of every year.
MTDWhen the cumulative sum should reset every month instead of every year.
WTDWhen the cumulative sum should reset every week (only available on projects with the week dimension). See: Project Settings
RUNNINGSUMWhen you want a running total across the full time axis without a yearly reset.
Was this page helpful?