Table.FillUp
Fills the nulls of the columns you name with the value below them.
Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Table.FillUp(table as table, columns as list) as table
| Parameter | Type | Description |
|---|---|---|
table | table | The table to fill. |
columns | list | The columns to fill. |
Returns
table. The table with each null replaced by the nearest value below it in its column.
Remarks
- Only null is filled; a null with no value below it stays null.
Examples
A total written at the end of each block
let
Report = #table({"Product", "Shop"}, {{"Chair", null}, {"Lamp", "Oslo"}, {"Desk", null}, {"Chair", "Bergen"}})
in
Table.FillUp(Report, {"Shop"})
| Product | Shop |
|---|---|
| Chair | Oslo |
| Lamp | Oslo |
| Desk | Bergen |
| Chair | Bergen |