Rename and reorder columns
Produce report-ready column names and order without changing any values.
~8 min read · beginner · Module 4: Working with columns
By Tahir Nas · Examples run in our simulator · Published · Updated
Before this: Choose Columns vs Remove Columns
Source systems name columns for programmers: CustID, ORD_DT, amt_usd. Reports need names people understand. Renaming changes no values, but it matters to everyone downstream, and it affects every later step that refers to the column.
Renaming
Double-click a header to rename it. Consecutive renames are recorded in one Table.RenameColumns step with a list of {old, new} pairs.
Choosing sets the order too
Dragging a header creates Table.ReorderColumns. But Table.SelectColumns already returns columns in the order you list them, so a select-then-rename pipeline usually needs no separate reorder step:
let
Source = #table({"OrderID", "Customer", "Region", "Product", "Qty", "UnitPrice", "Status"}, {
{"A-101", "Ana Ruiz", "North", "Kite", 2, 12.5, "Complete"},
{"A-102", "Ben Okafor", "South", "Reel", 6, 4, "Cancelled"},
{"A-103", "Cleo Park", "North", "Line", 4, 3.5, "Complete"},
{"A-104", "Dev Shah", "West", "Kite", 1, 12.5, "Complete"}
}),
Kept = Table.SelectColumns(Source, {"OrderID", "Status", "Customer", "UnitPrice"}),
Renamed = Table.RenameColumns(Kept, {{"OrderID", "Order Number"}, {"Customer", "Customer Name"}, {"UnitPrice", "Unit Price"}})
in
RenamedResult
| Order Number | Status | Customer Name | Unit Price |
|---|---|---|---|
| A-101 | Complete | Ana Ruiz | 12.5 |
| A-102 | Cancelled | Ben Okafor | 4 |
| A-103 | Complete | Cleo Park | 3.5 |
| A-104 | Complete | Dev Shah | 12.5 |
Output produced by the Power Query Exercises simulator, an independent implementation of a documented subset of M.
Reordering part of a table
When you don't want to drop anything, Table.ReorderColumns moves columns. You can list only some of them: columns you don't list stay exactly where they are, and the listed columns are rearranged, in your order, among the positions they occupied:
Table.ReorderColumns(
#table({"Region", "OrderID", "Qty"}, {{"North", "A-101", 2}}),
{"OrderID", "Region"}
)Result
| OrderID | Region | Qty |
|---|---|---|
| A-101 | North | 2 |
Output produced by the Power Query Exercises simulator, an independent implementation of a documented subset of M.
Where to rename
Later steps refer to the new names. If you rename a column after other steps already use it, those steps keep the old name and break the next time the query is edited. Two patterns avoid that: rename early, right after setting types, so every later step uses the friendly names; or rename at the very end as a presentation step, so all calculation steps use the source names. Mixing the two is what causes trouble.
Where to find this in Excel
- Excel for Windows
- Double-click a column header to rename it
- What you see
- The header becomes editable and the change is recorded as a Renamed Columns step.
Paths are for the Power Query editor in Excel for Microsoft 365, checked against Microsoft's documentation on 8 November 2026: Use Power Query to transform data (the Power Query editor) (Microsoft Learn); Applied steps (Microsoft Learn).
Common mistakes
- A typo or wrong capitalisation in the old name, which raises The column … of the table wasn't found.
- Renaming a column in the middle of a query, then referencing the old name in a later custom column.
- Adding a separate reorder step after Choose Columns when the select list could set the order.
Excel, Power BI and the simulator
- Excel and Power BI Desktop: double-click a header or press F2 to rename; drag headers to reorder. Both hosts merge consecutive renames into one step.
- In Power BI, renaming in Power Query renames the field in the model. Renaming later in the report view creates a display name only for that visual.
- The simulator supports both functions, including the optional MissingField argument.
Next step
Apply this lesson in the simulator. The exercise is checked against fresh data, so the query has to work for rows it hasn't seen. It's free, with no account needed.
Practise: Rename and reorder columns for a finance report (kite shop)Practice this
Each exercise runs in the browser and is checked against fresh data, not just the example.
- beginner~6 minFree
Rename and reorder columns for a finance report (kite shop)
Give columns business-friendly names and put them in the order finance expects.
- beginner~6 minPro
Rename and reorder columns for a finance report (bakery)
Give columns business-friendly names and put them in the order finance expects.
- beginner~6 minPro
Rename and reorder columns for a finance report (bike rental)
Give columns business-friendly names and put them in the order finance expects.
- intermediate~7 minFree
Move the key column first and keep the rest in order (it assets)
Put AssetID first. Every other column keeps its current order, including columns added in future exports.
- intermediate~7 minPro
Move the key column first and keep the rest in order (fleet)
Put AssetID first. Every other column keeps its current order, including columns added in future exports.
- advanced~9 minFree
Rename columns from a mapping table (ledger)
Finance keeps a two-column table of old and new column names. Apply it, ignoring names the export doesn't have.
- advanced~9 minPro
Rename columns from a mapping table (crm)
Finance keeps a two-column table of old and new column names. Apply it, ignoring names the export doesn't have.