Reference Updated April 8, 2026

FILLMISSING_LAST

Category: Filtering & data shaping

Overview

The FILLMISSING_LAST function fills missing level values using the last available value from a specified dimension in the input node. If a row does not have a previous value, the Value parameter is used as fallback. The input node must already contain the levels of the dimension. If no dimension is specified, the default dimension is "Time".

Use this function when you want to fill structurally missing level values with the last available value instead of a constant.

Syntax

FILLMISSING_LAST('Node' [, "Dimension" [, Value [, "Behavior"]]])

Example usage: FILLMISSING_LAST('Revenue')

Parameters

ParameterDescriptionTypeRequiredDefault
NodeInput node with potentially missing level values, specified in single quotes (e.g.'Revenue')Node referenceYes
DimensionName of the dimension whose level values will be used to fill the input node, specified in double quotes (e.g."ProductDimension")Dimension nameNoFinest time level
ValueFallback value used when there is no last available value (i.e. before the first data point)NumberNo0
BehaviorControls which missing entries are filled. Available values:"All", "StartAtFirst", "FinishAtLast", "Interval"KeywordNo"All"

Behavior options:

  • "All": Fills all missing values. Before the first data point, the fallback Value is used. After the first data point, the last observed value is carried forward.
  • "StartAtFirst": Starts filling from the first data point onward. No rows are generated before the first value.
  • "FinishAtLast": Fills from the start of the horizon up to (and including) the last data point. No rows are generated after the last value.
  • "Interval": Fills only between the first and last data points. No rows before first or after last.

Output Shape

AspectBehavior
DimensionalityUnchanged (no levels added or removed)
ValuesExisting rows preserved. New rows are filled with the last observed value, or the fallback Value before the first data point.
Row countIncreases to include filled missing level values (extent depends on Behavior)

Watch Out

  • The input node must already contain levels of the specified dimension. FILLMISSING_LAST does not add new levels to the node.
  • The Value parameter is only used as a fallback before the first observed data point. After the first value, forward-fill (last observed value) applies regardless of the Value parameter.
  • If the node has linked levels, you cannot fill values of the linked-to dimension. Fill the source dimension instead to get all valid values.
  • This function enforces level links from dimension management. Do not use this function if you want the node to have different level links than the dimensions.
  • The fill operates per partition: with multiple non-target dimensions (e.g. products within years), the forward-fill runs independently for each partition.
  • If the input is empty, the function falls back to FILLMISSING behavior (constant fill).

Examples

Fill missing values across the time horizon

This example fills missing year values using the last available value. The project time horizon is 2025-2029.

The input node features the level values "2026" and "2028".

Input node: Input node

YearValue
202610
202850

Formula: FILLMISSING_LAST('Input node')

Year→ FILLMISSING_LAST Result
20250
202610
202710
202850
202950

The value 10 from 2026 is carried forward to 2027. The value 50 from 2028 is carried forward to 2029. Before the first data point (2025), the default fallback value 0 is used.

Formula: FILLMISSING_LAST('Input node', "Time", 0, "StartAtFirst")

Year→ FILLMISSING_LAST Result
202610
202710
202850
202950

"StartAtFirst" starts from the first available value (2026), so 2025 is omitted.

Formula: FILLMISSING_LAST('Input node', "Time", 0, "FinishAtLast")

Year→ FILLMISSING_LAST Result
20250
202610
202710
202850

"FinishAtLast" fills until the last value (2028), so 2029 is omitted.

Formula: FILLMISSING_LAST('Input node', "Time", 0, "Interval")

Year→ FILLMISSING_LAST Result
202610
202710
202850

"Interval" fills only between the first (2026) and last (2028) present values.

Fill missing values on a non-time dimension

This example fills missing product values by carrying the last available product value forward within each year.

The dimension "ProductDimension" consists of the level "Product" with values "A", "B", "C", "D", and "E".

Input node: Input node

YearProductValue
2026B10
2028C50
2028E100

Formula: FILLMISSING_LAST('Input node', "ProductDimension")

YearProduct→ FILLMISSING_LAST Result
2026A0
2026B10
2026C10
2026D10
2026E10
2028A0
2028B0
2028C50
2028D50
2028E100

For 2026, the first available product is "B" with value 10, which is carried forward to "C", "D", "E". Products before "B" get the fallback value 0. For 2028, the forward-fill runs independently: "C" = 50 carries to "D", then "E" = 100 takes over.

Formula: FILLMISSING_LAST('Input node', "ProductDimension", 0, "StartAtFirst")

YearProduct→ FILLMISSING_LAST Result
2026B10
2026C10
2026D10
2026E10
2028C50
2028D50
2028E100

"StartAtFirst" starts from the first available product in each year.

Formula: FILLMISSING_LAST('Input node', "ProductDimension", 0, "FinishAtLast")

YearProduct→ FILLMISSING_LAST Result
2026A0
2026B10
2028A0
2028B0
2028C50
2028D50
2028E100

"FinishAtLast" stops at the last available product in each year.

Formula: FILLMISSING_LAST('Input node', "ProductDimension", 0, "Interval")

YearProduct→ FILLMISSING_LAST Result
2026B10
2028C50
2028D50
2028E100

"Interval" fills between first and last. For 2026, there is only one value ("B"), so no interval to fill.


FunctionWhen to use instead
FILLMISSINGWhen you want missing values filled with a constant instead of the last available value.
FILL_NAWhen you want to fill N/A values on existing level combinations after pivoting instead of adding missing level values for a dimension.
Was this page helpful?