Table.ReorderColumns

Syntax

Table.ReorderColumns(table as table, columnOrder as list, optional missingField as nullable number) as table

Description

Returns a table from the input table, with the columns in the order specified by columnOrder. Columns that are not specified in the list will not be reordered. If the column doesn’t exist, an exception is thrown unless the optional parameter missingField specifies an alternative (eg. MissingField.UseNull or MissingField.Ignore).

Reference Data

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference

Power Query M Functions / Table Functions / Table.ReorderColumns