<!-- https://learnsql.cpetoday.com/functions/m/table-fillup -->
# Table.FillUp

Language: Power Query M
Category: Table: values and fill
Syntax: Table.FillUp(table as table, columns as list) as table
Summary: Fills blank cells in the listed columns with the value from the row below.
Returns: The table with blanks filled up.
Level: Beginner
Related: Table.FillDown, Table.ReplaceValue, Table.SelectRows, Table.Sort

## What it does
Table.FillUp is the opposite of Table.FillDown. It copies the next filled value upward into the blank cells above it. Some reports put the label on the last line of a block, not the first, and this step carries that label up to the rows that need it.

## Syntax and arguments
- **table**: the table to change. Required.
- **columns**: a list of column names in braces. Each column is filled separately. Required.

## Example
A report puts the period name on the last row of each block of transactions. The period is filled up so every transaction in the block carries it.

```powerquery
let
    Source = Excel.CurrentWorkbook(){[Name = "PeriodReport"]}[Content],
    Filled = Table.FillUp(Source, {"Period"})
in
    Filled
```

Each blank Period takes the value from the next filled row below it. The rows that hold the transactions keep their own details.

## Things to watch
- The fill depends on row order. A label in the wrong row fills the wrong block, so check the order before you use it.
- Use it only when the layout really puts the label at the bottom of each block.
- Total rows may hold the label too, so review the result before you summarize.
- Query folding: this step breaks folding. Put it after the steps that filter on the database.

## In business terms
Reports laid out for printing often put a heading or period at the end of a block. Filling up turns that layout into the table format that a summary needs, without retyping the labels.
