Skip to main content

Description

 

Returns an expression (Metric or List Property) with blanks replaced by the preceding non-blank value along the specified Dimension.

This function is non-iterative. Unlike the PREVIOUS function, which works iteratively on each cell, FILLFORWARD applies the computation in a single pass across the entire Metric. This makes it more efficient and also not bound by the current limitations on PREVIOUS, which can iteratively compute up to 10,000 Items in a Dimension.

Typical use cases include filling missing values in time series data or propagating categorical assignments where intermediate values are missing.

Unlike PREVIOUS, FILLFORWARD does not act on the current Metric. Also, if used inside conditional formulas (IF), it fills the blanks for the entire Metric first, and only then applies the condition.

Related functionPREVIOUS 

 

Syntax

FILLFORWARD(Expression, Dimension iON clause])

 

Arguments

 

Argument

Type

Dimensions

Description

Expression (required)

Any type

Defined on Dimension

The expression (Metric or List Property) containing the values to fill.

Dimension (required)

Dimension

Any Dimension

The Dimension along which blank values will be filled forward.

ON clause (optional)

Ranking expression

Same Dimension

Defines the ranking order for filling values.

By default, data will be filled forward. Backward data filling can be done by reversing the ranking in the ON clause. See Example 2 below.

 

Returns

 

Type

Dimensions

Same as Expression

Same as Expression

 

Examples

 

You input spot forecasts for three Vacuum Cleaner products in a Metric called Month Forecast Inputs. You leave blank the months that are unchanged from the month prior:

 

Example 1

In a separate Metric, Baseline Month Forecast, you use FILLFORWARD to fill the blanks:

FILLFORWARD('Month forecast inputs',Month)

 

 

Example 2

 You use the ON operator with the RANK function to reverse the fill direction. Month alone does not rank by default, you need to reference its Start Date Property:

FILLFORWARD('Month forecast inputs',Month ON RANK(Month.'Start Date',0,DESC))

 

Best Practices & Limitations

 

When to Use FILLFORWARD

  • Efficient filling of missing values: Use FILLFORWARD when you need to fill blanks across an entire Metric quickly and efficiently.

  • Custom ranking: Apply it when you need forward- or backward-filling controlled by a specific ordering (e.g., descending date, business priority).

  • Time series continuity: Useful for Metrics like rolling headcount, sales pipeline status, or last known assignment.

When to Use PREVIOUS Instead

  • Cell-level iteration: If you need row-by-row iterative logic that interacts with conditions at the cell level, PREVIOUS is the better choice.

  • Formulas relying on IF conditions: PREVIOUS applies IF at each modality step, whereas FILLFORWARD fills globally first, which can lead to different results.

⚠️ Important

Sparse datasets allow for much faster computation. The FILLFORWARD function can densify your model, as it adds values in its Metrics, reducing performance.

 

Limitations

  • Cannot act on current Metric directly: Always requires an explicit Metric as the Value argument.

  • Not suitable for cumulative calculations: Use CUMULATE or iterative functions if you need true cumulative behavior, not just filling blanks.

  • Blank initialization: If no non-blank value exists before a blank, the cell remains blank.

Be the first to reply!

Reply