Reference Updated April 8, 2026

TIMELAG

Category: Rollforward & time series

Overview

The TIMELAG function calculates time-lagged effects on a chosen time granularity. Each value from the input node is distributed over future periods according to a lag profile. Multiple contributions can overlap when several input values are lagged into the same period.

Use this function when an effect should show up gradually or with a delay across time periods, for example to model delayed investment effects or gradual impact curves.

Syntax

TIMELAG('ValueNode', 'TimeLagNode', "TimeLevel")

Example usage: TIMELAG('Investment', 'TimeLagNode', "Year")

Parameters

ParameterDescriptionTypeRequired
Value NodeInput node with the values that should be time-lagged. Must have the selected time level.Node referenceYes
TimeLag NodeNode containing values between 0 and 1 (= 100%) on the Sequence dimension, defining how the lag is applied. Sequence entry 0 refers to the impact in the base year. This node should not have the selected time level.Node referenceYes
Time LevelName of the time level where one time-level step equals one sequence step, specified in double quotes (e.g."Year")Level nameYes

Output Shape

AspectBehavior
DimensionalityPreserves the non-time levels of the Value Node. The time level is set as specified.
ValuesEach input value is multiplied by the lag input and spread across future periods. Overlapping contributions are summed.
Row countTypically increases, as each input value generates multiple output rows across the lag window.

Watch Out

  • The Value Node must have a time level at least as fine-grained as specified in the function.
  • The TimeLag Node must not contain any time level.
  • The TimeLag Node cannot be more fine-grained than the Value Node on non-sequence levels.
  • Beyond the last defined sequence entry, the last lag value is repeated indefinitely. If the last entry is 0.75, the contribution permanently stays at 75%. It does not automatically reach 100%.
  • Gaps in the sequence (e.g. entries at 0, 1, 2, 4 but not 3) are treated as zero.
  • If the sequence does not start at 0, position 0 defaults to zero.
  • If the TimeLag Node has no matching lag profile for a given category, the output for that category is zero (not the original values).
  • If the Value Node has data at a finer time level than the specified Time Level (e.g. monthly data with "Year"), values are automatically aggregated before the lag is applied.

Examples

Distributing a single value with a gradual ramp-up

This example shows how a single investment is gradually phased in over time. 20% of the effect is felt immediately, 50% after one year, and the full effect is reached after two years.

Input node: Cost

YearCost
2025100

Input node: LagProfile

SequenceEffect
00.2
10.5
21

Formula: TIMELAG('Cost', 'LagProfile', "Year")

Year-> TIMELAG Result
2025100 * 0.2 = 20
2026100 * 0.5 = 50
2027100 * 1 = 100

The effect ramps up from 20% to 100% over two years. From 2027 onward, the full value persists because the last sequence entry (1) repeats indefinitely.

Overlapping contributions from multiple input periods

This example shows how investments are distributed over future years based on a lag profile. The lag profile gradually releases each investment amount over three sequence steps, so later years can contain overlapping contributions from multiple inputs.

Input node: Investment

YearInvestment
202510
20260
202715
20280

Input node: TimeLagNode

SequenceEffect
00
10.25
20.5
31

Formula: TIMELAG('Investment', 'TimeLagNode', "Year")

Year→ TIMELAG Result
202510 * 0 = 0
202610 * 0.25 = 2.5
202710 * 0.5 = 5
202810 * 1 + 15 * 0.25 = 13.75
202910 * 1 + 15 * 0.5 = 17.5
203010 * 1 + 15 * 1 = 25

From 2028 onward, both the 2025 investment (at full effect) and the 2027 investment (ramping up) contribute to the result.

Different lag profiles per category

The TimeLag Node can include non-sequence dimensions to define separate lag curves per category. Here, Category A ramps up in one year while Category B ramps up over three years.

Input node: Investment

YearCategoryInvestment
2025A100
2025B100

Input node: LagProfile

SequenceCategoryEffect
0A0.5
1A1
0B0
1B0.25
2B0.5
3B1

Formula: TIMELAG('Investment', 'LagProfile', "Year")

YearCategory-> TIMELAG Result
2025A100 * 0.5 = 50
2026A100 * 1 = 100
2025B100 * 0 = 0
2026B100 * 0.25 = 25
2027B100 * 0.5 = 50
2028B100 * 1 = 100

Category A reaches full effect after one year. Category B ramps up gradually over three years. The lag profile node can also use a coarser level than the Value Node (e.g. Product Group on the lag profile while the Value Node has Product). Child values inherit the parent’s lag curve.

Temporary effect with a zero-ending sequence

If the last sequence entry is 0, the contribution decays to nothing permanently. This models impulse or temporary effects that fully disappear after a defined period.

Input node: Campaign

YearCampaign
2025100

Input node: LagProfile

SequenceEffect
00
11
20.5
30

Formula: TIMELAG('Campaign', 'LagProfile', "Year")

Year-> TIMELAG Result
2025100 * 0 = 0
2026100 * 1 = 100
2027100 * 0.5 = 50
2028100 * 0 = 0

The effect peaks in 2026, decays to half in 2027, and disappears completely from 2028 onward. Because the last sequence entry is 0, the contribution stays at zero permanently.


FunctionWhen to use instead
STRETCH_CURVEWhen you want to stretch or compress a defined profile along the axis instead of applying a delayed effect over time.
SCHEDULEPROJECTSWhen you want to place project blueprints onto actual start periods instead of distributing an existing value with a lag profile.
SHIFTWhen you need to move existing values by a direct offset along a time level instead of distributing them with a lag profile over multiple periods.
Was this page helpful?