Power QueryExercises

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 table

Parameters

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

RegionQty
North2

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

RegionQty
North2

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

Common mistakes

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

Learn more

Related functions

Official documentation: Table.PromoteHeaders on Microsoft Learn.