Table.RemoveColumns is a Power Query M function that removes specified columns from a table. The function returns a new table without the specified columns, and can handle missing columns based on an optional parameter.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


   table as table,
   columns as any,
   optional missingField as nullable number,
) as table


Removes the specified columns from the table provided. If the specified column doesn’t exist, an error is raised unless the optional parameter missingField specifies an alternative behavior (for example, MissingField.UseNull or MissingField.Ignore).


Remove column [Phone] from the table.

// Output: Table.FromRecords( {[CustomerID = 1, Name = "Bob"]} )
    Table.FromRecords( {[CustomerID = 1, Name = "Bob", Phone = "123-4567"]} ),

Try to remove a non-existent column from the table.

// Output: [Expression.Error] The column 'Address' of the table wasn't found.
    Table.FromRecords( {[CustomerID = 1, Name = "Bob", Phone = "123-4567"]} ),

Other functions related to Table.RemoveColumns are:

BI Gorilla Blog

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation:
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.