Reorder columns in Power Query and Power BI
What reordering columns in Power Query and Power BI changes, where the new order shows up, how it can break refreshes, and when to reorder in a visual instead.
Reordering columns in Power BI can mean two different things. You can change the column order of the table a query produces, which you do in Power Query. Or you can change the order in which fields appear in a report visual. These are separate layers, and each one controls a different set of outputs. This review explains what each method changes, where the result shows up, and when reordering is worth the extra step.
Short answer: is reordering the right step for you?
Reordering in Power Query makes the query output easier to scan and gives a predictable column layout to anything that reads the table directly. The main tradeoff is fragility. The step Power Query generates refers to columns by name, so a later rename or removal in the source can break the refresh. If you only care about how a report looks, reordering in Power Query is often the wrong tool, because report visuals take their column order from their own field lists.
- Reorder in Power Query when the table is loaded into an Excel sheet, exported for another system, or read by something that depends on column position.
- Reorder in the visual when the goal is how a table or matrix looks in a Power BI report.
- Keep the default order when no person or process depends on column position. Measures, relationships and visuals refer to columns by name, so they do not need a particular order.
What reordering actually changes
Moving a column in the Power Query Editor adds an applied step, usually based on the Table.ReorderColumns function. The step changes only the position of columns in the table schema. Cell values, data types, column names and row count stay the same. Because the step is written into the query's M code, the change is stored and runs again on every refresh.
There are three common ways to reorder columns in the editor. You can drag column headers. You can use the Move command on the Transform tab, which offers Left, Right, To Beginning and To End. Or you can use Choose Columns. Choose Columns is built on Table.SelectColumns, which returns columns in the order they are listed, so it can drop and reorder columns in a single step. Menu labels can differ slightly between Power BI Desktop, Excel and other Power Query hosts.
#"Reordered Columns" = Table.ReorderColumns(#"Changed Type", {"OrderID", "OrderDate", "Customer", "Amount"})
"Reorder" here means changing column position. It does not mean sorting, which changes the order of rows. It also does not mean reversing text: column names move as whole units, and no characters inside a name or a cell are rearranged. Text-reversal problems, such as separated combining marks or broken multi-code-point emoji, therefore do not apply. If you really want to reverse the column order, you have to do it explicitly:
Reversed = Table.ReorderColumns(Source, List.Reverse(Table.ColumnNames(Source)))
In a Power BI report, the column order of a table or matrix visual comes from the order of fields in that visual's Columns well. It does not come from the query. You change it by dragging fields within the well. The Data pane lists fields alphabetically whatever the query order is. As a result, a reorder step in Power Query often has no visible effect on the report.
| Where column order shows up | What controls it |
| Power Query Editor preview | Applied steps in the query |
| Table loaded to an Excel sheet | Query output order, subject to the table's layout-preservation setting |
| Power BI table or matrix visual | Field order in the visual's Columns well |
| Power BI Data pane | Alphabetical listing, not query order |
| Data exported from a visual | The visual's field order |
The main tradeoff: column names are hardcoded
A reorder step created through the interface lists the columns by name. According to the function documentation, columns that are not in the list keep their positions, so a new column added at the source usually does not break the step. A listed column that is renamed or removed at the source does break it, and the refresh fails with a column-not-found error. You can avoid this in two ways. One is the optional missing-field argument, which tells the step to ignore absent columns. The other is to build the column list dynamically instead of typing every name.
// Ignore listed columns that no longer exist
Reordered = Table.ReorderColumns(Source, {"OrderID", "Customer"}, MissingField.Ignore)
// Move one column to the front without naming the rest
Moved = Table.ReorderColumns(Source, {"OrderID"} & List.RemoveItems(Table.ColumnNames(Source), {"OrderID"}))
Dynamic steps hold up better when the source changes, but they are harder for someone working only in the interface to read. Editing one through the gear icon may not be possible, so the M code has to be edited by hand. If a fixed schema is a requirement, a hardcoded step that fails loudly can be the better choice, because it flags an unexpected source change instead of passing it through silently.
Will the order survive copying, exporting and sharing?
Whether the order survives depends on where the data ends up. Data exported from a Power BI visual follows that visual's field order, not the query's. A query loaded into an Excel table normally follows the query order. Excel tables connected to external data also have a property that preserves the existing column layout on refresh, though. If the sheet does not pick up a new order, check the table's external data properties.
Inside Power BI Desktop, do not treat Table view as proof that a reorder worked. Users have reported that Table view keeps the original column order after the query has changed. This review did not verify that report, so check the Power Query preview, or the output that actually matters to you, in your own file.
Column order matters most when something reads columns by position: a fixed-layout CSV import, a script that uses column indexes, or a person scanning a wide sheet. DAX measures, relationships and visuals refer to columns by name, so reordering does not affect them. If a downstream system requires a specific layout, document that layout in plain text alongside the query. A reorder step alone does not explain why the order matters to the next person who edits the query.
Report readers who use screen readers or keyboard navigation experience the visual's column order and the report's tab order, which is set in the Selection pane. The query order does not affect them. This review had no tested evidence of how specific assistive technologies read Power BI table visuals, so no such behavior is claimed here. If accessibility is a requirement, test with the assistive technology your audience actually uses.
Gaps in this review
- No hands-on tests, timings or version-specific results were available. The behavior described is based on general documented function behavior.
- Interface labels and menu locations can differ between Power BI Desktop, Excel and other Power Query hosts, and between versions.
- The report that Table view keeps an old column order is unverified.
- Screen reader behavior with Power BI visuals was not tested.