Table.FillDown Function (Power Query M)

If you have a column where a value appears once and the cells below it are blank, Table.FillDown copies that value down into the empty cells. In this article I’ll show you how to use it with simple, practical examples.

Syntax of Table.FillDown Function

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

where

  • table (required, table). The table you want to fill values down in.
  • columns (required, list). The names of the columns to fill, given as a list of text values, like {"Region"}.

Returns: a table where each null cell in the chosen columns is replaced by the nearest non-null value above it.

In plain terms, it walks down each listed column and carries the last real value into every blank cell beneath it.

Example 1: Fill down a single column

Say you have a list of sales reps where the Region is only entered on the first row of each group.

The blank cells below it really mean “same region as above”, so you want to fill them in.

Here is the starting data:

RegionSales Rep
WestAarav Mehta
Diego Ramirez
Karen Foster
EastPriya Nair
Brandon Lee

Fill the Region column down:

let
Source = Excel.CurrentWorkbook(){[Name="Example1"]}[Content],
#"Filled Down" = Table.FillDown(Source,{"Region"})
in
#"Filled Down"

Each blank Region picks up the value from the row above it.

The result fills every gap:

RegionSales Rep
WestAarav Mehta
WestDiego Ramirez
WestKaren Foster
EastPriya Nair
EastBrandon Lee

Example 2: Fill down more than one column at once

You can list several columns and fill them all in a single step.

Here both Region and Manager are entered once per group, with blanks underneath.

Here is the starting data:

RegionManagerOrder
NorthSandeep RoyORD-101
ORD-102
ORD-103
SouthMegan ClarkORD-104
ORD-105

Pass both column names in the list:

let
Source = Excel.CurrentWorkbook(){[Name="Example2"]}[Content],
#"Filled Down" = Table.FillDown(Source,{"Region","Manager"})
in
#"Filled Down"

Each column fills independently, top to bottom.

The result fills both columns:

RegionManagerOrder
NorthSandeep RoyORD-101
NorthSandeep RoyORD-102
NorthSandeep RoyORD-103
SouthMegan ClarkORD-104
SouthMegan ClarkORD-105

Example 3: A leading blank stays empty

Table.FillDown can only copy a value from above, so a null with nothing above it has nothing to pull from.

Here the first Quarter cell is blank before any real value appears.

Here is the starting data:

QuarterProduct
Notebook
Q1Stapler
Marker
Q2Folder

Fill the Quarter column down:

let
Source = Excel.CurrentWorkbook(){[Name="Example3"]}[Content],
#"Filled Down" = Table.FillDown(Source,{"Quarter"})
in
#"Filled Down"

The blank under Q1 fills, but the top blank has no value above it.

The result leaves the first cell empty:

QuarterProduct
Notebook
Q1Stapler
Q1Marker
Q2Folder

The top row stays blank because there is no earlier value to carry down.

Example 4: Fill grouped labels before further analysis

You often get this when cleaning up a report where a category label only prints once per block.

Here the Department is listed once, and you want it on every row so you can group or filter by it later.

Here is the starting data:

DepartmentEmployeeHours
MarketingOlivia Grant38
Rohit Sharma41
Jason Webb36
FinanceNeha Kapoor40
Tyler Brooks39
Emily Carter42

Fill the Department column down:

let
Source = Excel.CurrentWorkbook(){[Name="Example4"]}[Content],
#"Filled Down" = Table.FillDown(Source,{"Department"})
in
#"Filled Down"

Every employee row now carries its department name.

The result tags each row with its department:

DepartmentEmployeeHours
MarketingOlivia Grant38
MarketingRohit Sharma41
MarketingJason Webb36
FinanceNeha Kapoor40
FinanceTyler Brooks39
FinanceEmily Carter42

With the column filled, every row stands on its own and is ready to group or filter. From here you can also select the columns you want to keep for the final report.

Things to keep in mind with Table.FillDown

  • Only null cells get filled, never blank text. A cell holding an empty string "" counts as a value, so it stops the fill and is not replaced. Convert empty strings to null first if you want them filled.
  • Fill before you trim. If your goal is to drop empty rows after cleaning, remove null values in Power Query once the real labels are in place, not before.
  • A leading null stays null. With no value above it, the function has nothing to carry down (Example 3). Use Table.FillUp if the value to copy sits below instead.
  • Column names are case-sensitive and must match exactly. A wrong name throws Expression.Error: The column 'Regoin' of the table wasn't found. Check spelling and casing against the headers.
  • The list takes text, not column references. Write {"Region"}, not {[Region]}. The second form throws an error because the argument is a list of column names.
  • Row order drives the result. Fill happens in the table’s current order, so sort the rows the way you want before filling, since a later sort will not re-fill anything.

Common questions about Table.FillDown

What is the difference between Table.FillDown and Table.FillUp?

Table.FillDown copies values downward into the blanks below, while Table.FillUp copies them upward into the blanks above. Use whichever matches where the real value sits.

Can Table.FillDown replace blank cells with a fixed value instead?

No, it only copies the nearest value from above. To put a set value into blanks, use Table.ReplaceValue with null as the value to find. If you are building the table from scratch, you can also avoid the gaps by handling missing fields when you create the table from records.

List of All Power Query Functions

Related Power Query Functions / Articles:

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.