Returns a table that contains only specific columns.

Table.SelectColumns(table as table, columns as any, optional missingField as any) as table


Argument Description
table The Table to modify.
columns The list of columns to copy.
optional missingField The default value of missingField is MissingField.Error. For more information, see Parameter Values.


  • Table.SelectColumns is similar to Record.SelectFields applied to every row in a table.


Table.SelectColumns(Table.FromRecords({[A=1, B=2]}), "B") equals Table.FromRecords({[B=2]})

Table.SelectColumns(Table.FromRecords({[A=1, B=2, C=3]}), {"C", "B"}) equals Table.FromRecords({[B=2, C=3]})

Table.SelectColumns(Table.FromRecords({[A=1, B=2]}), "X") equals Expression.Error

Table.SelectColumns(Table.FromRecords({[A=1, B=2]}), "X", MissingField.Ignore) equals Table.FromRecords({[]})

Table.SelectColumns(Table.FromRecords({[A=1 ,B=2]}), "X", MissingField.UseNull) equals Table.FromRecords({[X=null]})

Applies to:
Excel 2013, Excel 2010