Table.PromoteHeaders
Table function · By Tahir Nas · Examples run in our simulator · Published · Updated
Uses the first row as column names.
When to use it
Use it after importing a CSV or sheet whose first row holds the column names. Remove title rows above the header first, and review the generated Changed Type step that follows.
Syntax
Table.PromoteHeaders(table as table, optional options as nullable record) as tableParameters
- options
- [PromoteAllScalars = true] promotes numbers and dates too.
Returns
The table with headers from its first row.
Example
Table.PromoteHeaders(#table({"Column1", "Column2"}, {{"Region", "Qty"}, {"North", "2"}}))Result
| Region | Qty |
|---|---|
| North | 2 |
Example: skip a banner, then promote
Removing the top rows first makes the real header row the first row.
Table.PromoteHeaders(Table.Skip(#table({"Column1", "Column2"}, {{"Sales report", null}, {"Region", "Qty"}, {"North", "2"}}), 1))Result
| Region | Qty |
|---|---|
| North | 2 |
Both results are produced by the Power Query Exercises simulator, an independent implementation of a documented subset of M, and checked on every build.
Good to know
- Remove banner rows before promoting.
Common mistakes
- Promoting while a banner row is still on top.
- Not handling duplicate header names, which get suffixes.
The matching command in Excel
- Excel for Windows
- Home > Use First Row as Headers
- What you see
- The first row becomes the column names; repeated names get a numeric suffix.
Paths are for the Power Query editor in Excel for Microsoft 365, checked against Microsoft's documentation on 8 November 2026: Promote or demote column headers (Microsoft Learn).
Exercises that use Table.PromoteHeaders
- beginner~10 minFree
Clean and summarize a sales export
Trim messy region names, keep valid completed orders, remove an exact duplicate and total revenue by region.
- beginner~7 minFree
Import a semicolon-separated stock file (hardware)
Read a CSV that uses semicolons, promote headers and set number types.
- beginner~7 minFree
Skip the title rows in a report export (consultancy)
The export starts with a report title and a blank line. Skip them, then promote the real headers.
- beginner~6 minFree
Keep order numbers' leading zeros (kite shop)
Type a CSV so order numbers stay text (0007, not 7) while quantities and prices become numbers.
- intermediate~8 minFree
Convert day-first dates with the right locale (consultancy)
Claim dates are written 05/03/2026 meaning 5 March. Convert them to real dates using the en-GB culture.
- intermediate~7 minFree
Read amounts written with a decimal comma (consultancy)
A German export writes 1.234,56 for one thousand two hundred thirty-four point five six. Convert it with the de-DE culture.
Learn more
- Import CSV files: delimiters, encodings and headers lesson
- Remove report banners before promoting headers lesson
- Combine monthly files into one table with Power Query guide
Related functions
Official documentation: Table.PromoteHeaders on Microsoft Learn.