Table.FillUp

Table

Fills null values in specified columns with the next non-null value below.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Table.FillUp(table as table, columns as list) as table

Parameters

NameTypeRequiredDescription
tabletableYesThe input table containing null values to fill.
columnslistYesA list of column names to apply the fill-up operation to.

Return Value

tableA table with null values in the specified columns replaced by the next non-null value from below.

Remarks

Table.FillUp scans each specified column from bottom to top. When it encounters a null, it replaces it with the next non-null value from below. If the last value in a column is null, it remains null because there is no subsequent value to propagate.

This is the complement of Table.FillDown. Use Table.FillUp when null values should inherit from the row beneath them, or combine both functions to fill nulls in both directions.

Examples

Example 1: Fill up a column

let
    Source = Table.SelectColumns(Table.FirstN(Sales, 4), {"CustomerName", "Region"}),
    WithNulls = Table.ReplaceValue(Source, "East", null, Replacer.ReplaceValue, {"Region"})
in
    Table.FillUp(WithNulls, {"Region"})
Result
CustomerName
Region
1AliceWest
2BobWest
3CharlieNorth
4AliceNorth

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks