Table.FillDown
TableReplaces null values in specified columns with the most recent non-null value above.
Syntax
Table.FillDown(table as table, columns as list) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
table | table | Yes | The input table containing null values to fill. |
columns | list | Yes | A list of column names in which to propagate non-null values downward. |
Return Value
table — The 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 | |
|---|---|---|---|
| 1 | East | Widget A | 4 |
| 2 | East | Widget C | 10 |
| 3 | East | Thingamajig E | 1 |
| 4 | East | Gadget D | 1 |
| 5 | East | Widget C | 8 |
| 6 | West | Gadget B | 2 |
| 7 | West | Widget A | 6 |
| 8 | West | Gadget B | 3 |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks