Table.FillDown

Table

Replaces null values in specified columns with the most recent non-null value above.

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

Syntax

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

Parameters

NameTypeRequiredDescription
tabletableYesThe input table containing null values to fill.
columnslistYesA list of column names in which to propagate non-null values downward.

Return Value

tableThe input table with null values in the specified columns replaced by the last non-null value above.

Remarks

Table.FillDown scans each specified column from top to bottom. When it encounters a null, it replaces it with the most recent non-null value from above in the same column. If the first value in a column is null, it remains null because there is no preceding value to propagate.

This function is commonly used after operations like unpivoting or when importing data where group headers appear only once and subsequent rows are blank.

Examples

Example 1: Fill down a single column

let
    Source = Table.SelectColumns(
        Table.Sort(Sales, "Region"),
        {"Region", "Product", "Quantity"}
    ),
    // Simulate a grouped export where "North" labels are missing
    WithBlanks = Table.ReplaceValue(Source, "North", null, Replacer.ReplaceValue, {"Region"})
in
    Table.FillDown(WithBlanks, {"Region"})
Result
Region
Product
Quantity
1EastWidget A4
2EastWidget C10
3EastThingamajig E1
4EastGadget D1
5EastWidget C8
6WestGadget B2
7WestWidget A6
8WestGadget B3

Compatibility

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