Power QueryExercises

Table.RemoveColumns

Table function · By Tahir Nas · Examples run in our simulator · Published · Updated

Removes the listed columns and keeps everything else.

When to use it

Use it to drop known columns, such as personal data or helper columns, while letting every other column through. It suits feeds where new columns should appear automatically. For a fixed output schema, Table.SelectColumns is safer.

Syntax

Table.RemoveColumns(table as table, columns as any, optional missingField as nullable number) as table

Parameters

columns
Column name or list of names to remove.
missingField
What to do if a listed column doesn't exist.

Returns

The table without those columns.

Example

Table.RemoveColumns(#table({"Region", "Product", "Qty"}, {{"North", "Kite", 2}, {"South", "Reel", 5}, {"North", "Reel", 1}, {"West", "Kite", 4}}), {"Region"})

Result

ProductQty
Kite2
Reel5
Reel1
Kite4

Example: remove columns that may already be gone

MissingField.Ignore lets the step succeed whether or not the column is still in the source.

Table.RemoveColumns(#table({"Name", "Email", "Score"}, {{"Ana", "a@x.example", 7}}), {"Email", "Phone"}, MissingField.Ignore)

Result

NameScore
Ana7

Both results are produced by the Power Query Exercises simulator, an independent implementation of a documented subset of M, and checked on every build.

Good to know

Common mistakes

The matching command in Excel

Excel for Windows
Home > Remove Columns, or right-click a column header > Remove Columns
What you see
The selected columns are removed and every other column passes through.

Paths are for the Power Query editor in Excel for Microsoft 365, checked against Microsoft's documentation on 8 November 2026: Choose or remove columns (Microsoft Learn).

Exercises that use Table.RemoveColumns

Learn more

Related functions

Official documentation: Table.RemoveColumns on Microsoft Learn.