Comment on page
Table.RemoveColumns
Removes the specified columns.
function (table
as table, optionalcolumns
as nullable any, optionalmissingField
as nullable any) as table
Removes the specified
columns
from the table
provided. If the column doesn't exist, an exception is thrown unless the optional parameter missingField
specifies an alternative (eg. MissingField.UseNull
or MissingField.Ignore
).Table.Column operations
Remove column [Phone] from the table.
Table.RemoveColumns(Table.FromRecords({[CustomerID=1, Name="Bob", Phone = "123-4567"]}), "Phone")
Table.FromRecords({[CustomerID=1,Name="Bob"]})
Remove column [Address] from the table. Throws an error if it doesn't exist.
Table.RemoveColumns(Table.FromRecords({[CustomerID=1, Name="Bob", Phone = "123-4567"]}), "Address")
[Expression.Error] The field 'Address' of the record was not found.
Last modified 5yr ago