The Table.PromoteHeaders function in Power Query takes the first row of a table and turns its values into the column headers. You need it when your data comes in with headers like Column1 and Column2, and the real headers are in the first row.
I’ll go through ten examples below, covering a basic promote, title rows above the headers, blank and duplicate headers, dates as headers, and combining tables.
Follow along with the example file
Table.PromoteHeaders Function Examples.xlsx
Table.PromoteHeaders Function Syntax
= Table.PromoteHeaders(table as table, optional options as nullable record) as table
- table – the table whose first row has the headers you want. This is usually the previous step, such as
Source. - options (optional) – a record with PromoteAllScalars (set it to
trueto also promote values like dates and TRUE/FALSE, not just text and numbers) and Culture (a regional format code, such as"en-GB"for the UK, that decides how values like dates are written as header text; without it, Power Query uses the workbook’s regional settings).
What it returns – the same table with the first row’s values as the column names, and that row removed from the data.
By default, only text and number values become headers. Any other value in the first row, such as a date or a blank cell, gives that column a default name like Column3 instead.
I’ve tested the Table.PromoteHeaders function in Power Query in Excel for Microsoft 365. It’s also part of the Power Query M language that Power BI uses.
When to Use the Table.PromoteHeaders Function
Use this function when you need to:
- Use the first row of your data as the column headers
- Fix data that came in with Column1, Column2, and so on as headers
- Promote the header row after removing title rows above it
- Turn year numbers or dates in the first row into column headers
- Promote the headers of several tables before you combine them
Example 1: Use the First Row as Headers
Let’s start with the most common situation, where the real headers are in the first row of the data.
Below is an Excel table named TrainingLog with the course each employee took, where the table’s headers are Column1 to Column4 and the real headers (Employee, Department, Course, and Hours) are in the first row. I want to make that first row the headers.

This is what you’d see after importing a CSV file or a range that Power Query didn’t treat as having headers.
To follow along, select any cell in the table and go to Data > From Table/Range to open it in the Power Query Editor. If Power Query adds a Changed Type step, use #"Changed Type" in place of Source in the formulas below.
Add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.PromoteHeaders(Source)
Result: the columns are now named Employee, Department, Course, and Hours, and the table has five rows of data

Here, the function takes the values from the first row and uses them as the column names. That first row is then removed, so it doesn’t show up as data anymore.
You can do the same thing from the ribbon with the Use First Row as Headers button on the Home tab of the Power Query Editor.
Important: Only use this when the first row really holds the headers. If the table already has proper headers, Table.PromoteHeaders still promotes the first row, so your first row of data becomes the headers and the real headers are lost.
Example 2: Promote Headers and Then Set the Data Types
Promoting the headers only changes the column names. It doesn’t change the column data types, so you’ll usually want a step that sets them.
Below is an Excel table named Expenses with expense claims, where the real headers (Expense ID, Category, Amount, and Approved) are in the first row. I want to promote them and then give each column the right data type.

Select any cell in the Expenses table and go to Data > From Table/Range to open it in the Power Query Editor, as in Example 1. Then add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.PromoteHeaders(Source)
Result: the columns are now named Expense ID, Category, Amount, and Approved, but each column header still shows the ABC123 icon (the Any data type)

Here, the headers are right, but the data types are not set yet. Table.PromoteHeaders keeps whatever type each column already had, and a column that came straight from an Excel table has the Any type.
The amounts are still numbers, but Power Query doesn’t treat the Amount column as a number column until you set its type.
This result is for a step that promotes Source. If Power Query added its own Changed Type step when you opened the table, your columns already have types from that step, and the promote keeps them, so your icons may look different.
To promote the headers and set the types in one go, create a blank query (Data > Get Data > From Other Sources > Blank Query). In the Power Query Editor, open the Advanced Editor (Home > Advanced Editor) and use this code.
The Source line reads the table by its name, so if your table has a different name, change Expenses to that name. The same goes for the table names in the later examples.
let
Source = Excel.CurrentWorkbook(){[Name="Expenses"]}[Content],
#"Promoted Headers" = Table.PromoteHeaders(Source),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",
{{"Expense ID",type text},{"Category",type text},{"Amount",type number},{"Approved",type text}})
in
#"Changed Type"
Result: the same table, with ABC (text) icons on Expense ID, Category, and Approved, and a 1.2 (decimal number) icon on Amount

Here, the Promoted Headers step gives the columns their names, and the Changed Type step uses the Table.TransformColumnTypes function to set the type of each column. The order matters, because the Changed Type step refers to the columns by the names that the promote step created.
Example 3: Skip Title Rows Before Promoting the Headers
Exported reports often have a title or a date line above the actual headers. If you promote the first row as it is, the title becomes a header.
Below is an Excel table named StockReport with a warehouse stock export, where a report title and an export note sit above the real headers (SKU, Item, On Hand, and Reorder Level). I want to remove those two rows and use the header row.

Create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="StockReport"]}[Content],
#"Removed Top Rows" = Table.Skip(Source,2),
#"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows")
in
#"Promoted Headers"
Result: the columns are named SKU, Item, On Hand, and Reorder Level, with the five stock items below them

Here, the Removed Top Rows step uses the Table.Skip function to remove the first two rows. That leaves the header row at the top, and the Promoted Headers step turns it into the column names.
Example 4: Find the Header Row When the Number of Title Rows Changes
In Example 3, I knew there were exactly two title rows. But some exports add a different number of note lines each time, and a fixed number would then skip too few or too many rows.
Below is an Excel table named TicketExport with a help desk export, where three note lines sit above the real headers (Ticket ID, Agent, Priority, and Status). I want to promote the headers without hard-coding how many rows to skip.

Create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="TicketExport"]}[Content],
#"Removed Top Rows" = Table.Skip(Source,each [Column1] <> "Ticket ID"),
#"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows")
in
#"Promoted Headers"
Result: the columns are named Ticket ID, Agent, Priority, and Status, with the five tickets below them

Here, instead of a number, I gave the Table.Skip function a condition. It keeps skipping rows as long as Column1 is not “Ticket ID”, and stops at the first row where it is, which is the header row.
So whether the export has one note line or five, the query finds the header row and promotes it.
The match is exact and case-sensitive, so this works as long as the first header stays “Ticket ID”. If it changes, no row matches, every row gets skipped, and you get an empty table.
Example 5: Promote Year Numbers as Headers
Headers don’t have to be text. When the first row has numbers, like years, Table.PromoteHeaders promotes them too.
Below is an Excel table named Enrollment with the number of students in each program per year, where the first row has Program followed by the years 2024, 2025, and 2026 (stored as numbers). I want to use that row as the headers.

Select any cell in the Enrollment table and go to Data > From Table/Range to open it in the Power Query Editor, as in Example 1. Then add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.PromoteHeaders(Source)
Result: the columns are named Program, 2024, 2025, and 2026

Here, the years were numbers in the first row, and the function turned them into the text headers “2024”, “2025”, and “2026”.
Column names are always text, so when a later step needs one of these columns, give its name as text in double quotes, like "2024", not the number 2024.
Follow along with the example file
Table.PromoteHeaders Function Examples.xlsx
Example 6: Fix a Blank Header Cell
Sometimes one of the cells in the header row is empty. Table.PromoteHeaders can’t use a blank as a name, so that column gets a default name instead.
Below is an Excel table named PriceList with products, their unit prices, and a few notes, where the header cell above the notes is empty. I want to promote the headers and call the third column Notes.

Select any cell in the PriceList table and go to Data > From Table/Range to open it in the Power Query Editor, as in Example 1. Then add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.PromoteHeaders(Source)
Result: the columns are named Product, Unit Price, and Column3

Here, the blank cell came into Power Query as null, and null isn’t text or a number, so it can’t be promoted. The function names that column “Column” plus its position, which is why the third column is called Column3.
To give it a proper name, add a rename step. Create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="PriceList"]}[Content],
#"Promoted Headers" = Table.PromoteHeaders(Source),
#"Renamed Columns" = Table.RenameColumns(#"Promoted Headers",{{"Column3","Notes"}})
in
#"Renamed Columns"
Result: the columns are named Product, Unit Price, and Notes

Here, the Renamed Columns step uses the Table.RenameColumns function to change Column3 to Notes. Since the default name comes from the column’s position, this step works as long as the blank header stays in the third column.
Example 7: Handle Duplicate Header Names
Column names in Power Query have to be unique. So when the first row has the same header twice, Table.PromoteHeaders adds a number to the repeat.
Below is an Excel table named RepSales with each sales rep’s sales and returns for two quarters, where the first row has Sales and Returns twice (the first pair is Q3 and the second pair is Q4). I want to promote that row as the headers.

Select any cell in the RepSales table and go to Data > From Table/Range to open it in the Power Query Editor, as in Example 1. Then add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.PromoteHeaders(Source)
Result: the columns are named Sales Rep, Sales, Returns, Sales_1, and Returns_2

Here, the second Sales became Sales_1, and the second Returns became Returns_2 (not Returns_1). That’s because the function uses one running count for all the repeated names in the row, not a separate count for each name.
Since the suffixes don’t tell you which quarter is which, it’s a good idea to rename these columns right away. Create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="RepSales"]}[Content],
#"Promoted Headers" = Table.PromoteHeaders(Source),
#"Renamed Columns" = Table.RenameColumns(#"Promoted Headers",
{{"Sales","Q3 Sales"},{"Returns","Q3 Returns"},{"Sales_1","Q4 Sales"},{"Returns_2","Q4 Returns"}})
in
#"Renamed Columns"
Result: the columns are named Sales Rep, Q3 Sales, Q3 Returns, Q4 Sales, and Q4 Returns

Here, the Renamed Columns step gives each of the four columns a clear name. Note that it uses the exact names the promote step created, including Returns_2, so check the promoted names before you write the rename step.
Example 8: Clean Up the Header Names After Promoting
Data from databases and other systems often has headers like first_name or plan_type. Table.PromoteHeaders promotes them exactly as they are, but you can tidy them up in the next step.
Below is an Excel table named Members with gym members and their plans, where the first row has the headers member_number, first_name, plan_type, and monthly_fee. I want to promote them and turn them into readable names like First Name.

Select any cell in the Members table and go to Data > From Table/Range to open it in the Power Query Editor, as in Example 1. Then add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.PromoteHeaders(Source)
Result: the columns are named member_number, first_name, plan_type, and monthly_fee

The headers are promoted, but they still have underscores and are in lowercase. To clean them up, create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="Members"]}[Content],
#"Promoted Headers" = Table.PromoteHeaders(Source),
#"Cleaned Names" = Table.TransformColumnNames(#"Promoted Headers",
each Text.Proper(Text.Replace(_,"_"," ")))
in
#"Cleaned Names"
Result: the columns are named Member Number, First Name, Plan Type, and Monthly Fee

Here, the Cleaned Names step uses the Table.TransformColumnNames function, which runs the same change on every column name. The bare _ (no quotes) stands for each column name, while "_" in quotes is the underscore character to replace.
For each name, the Text.Replace function swaps the underscores for spaces, and the Text.Proper function capitalizes the first letter of each word. Unlike the rename in Example 7, this doesn’t list the columns one by one, so it works no matter how many columns there are.
Example 9: Promote Dates as Headers (PromoteAllScalars)
By default, Table.PromoteHeaders only promotes text and numbers. If the first row has dates, you need the PromoteAllScalars option, or the dates won’t become headers.
Below is an Excel table named WeeklySignups with the number of sign-ups for each week, where the Week Starting column has real dates. I want to flip the table so that each week becomes a column, with the week’s date as the header.

To do that, I’ll set the Week Starting column to the Date type (Excel dates come in as date and time values, so this keeps a 12:00:00 AM time out of the headers).
Then I’ll transpose the table, so the dates end up in the first row, and promote that row. Create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="WeeklySignups"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Week Starting",type date}}),
#"Transposed Table" = Table.Transpose(#"Changed Type"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")
in
#"Promoted Headers"
Result: the columns are named Column1, Column2, Column3, and Column4, with one row of sign-ups (48, 55, 61, and 52), and the dates are gone

This happens because the first row after transposing holds dates, and dates aren’t promoted by default. The function still removes that row, but it can’t use the dates as names, so it gives the columns default names instead.
To keep the dates, add the PromoteAllScalars option to the last step. Create a new blank query (it reads the same WeeklySignups table), open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="WeeklySignups"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Week Starting",type date}}),
#"Transposed Table" = Table.Transpose(#"Changed Type"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table",[PromoteAllScalars=true])
in
#"Promoted Headers"
Result: the columns are named 11/2/2026, 11/9/2026, 11/16/2026, and 11/23/2026, with the sign-ups below them

Here, [PromoteAllScalars=true] tells the function to promote every simple value in the first row, including dates. The dates are turned into text using the workbook’s regional settings, so with UK settings the first header would be 02/11/2026 instead.
If you want the same headers on every computer, add a Culture to the option, like [PromoteAllScalars=true,Culture="en-US"].
Also note that the Table.Transpose function doesn’t keep the original column names. So the Sign-ups label is gone, and the result is just one row of numbers under the date headers.
Example 10: Promote Headers Before Combining Tables
When you combine tables that each have their own header row, the order of the steps matters. If you combine first and promote after, only the first table’s header row gets promoted.
Below is an Excel table named NorthStore with the units and revenue of a few products in the North store, where the real headers (Item, Units, and Revenue) are in the first row.

And below is a second table named SouthStore with the same layout for the South store. I want to stack both stores into one table with proper headers.

Let’s first see what happens if you combine the tables and then promote the headers. Create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="NorthStore"]}[Content],
South = Excel.CurrentWorkbook(){[Name="SouthStore"]}[Content],
#"Appended Tables" = Table.Combine({Source,South}),
#"Promoted Headers" = Table.PromoteHeaders(#"Appended Tables")
in
#"Promoted Headers"
Result: seven rows, where the fourth row holds Item, Units, and Revenue as if it were data

Here, the Table.Combine function stacked the two tables, so the South store’s header row ended up in the middle. Table.PromoteHeaders only looks at the first row, so that second header row stays in the data.
The fix is to promote the headers of each table first, and then combine them. Create a new blank query, open the Advanced Editor, and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="NorthStore"]}[Content],
South = Excel.CurrentWorkbook(){[Name="SouthStore"]}[Content],
#"Appended Tables" = Table.Combine(
List.Transform({Source,South},each Table.PromoteHeaders(_)))
in
#"Appended Tables"
Result: six rows of data (three from each store) under the headers Item, Units, and Revenue

Here, the List.Transform function runs Table.PromoteHeaders on each table in the list, where the underscore _ stands for each table. Each table gets its own headers before the Table.Combine function stacks them, so the header row shows up only once.
This is the same thing you’d do when you combine CSV files from a folder, where every file has its own header row.
Other Excel Articles You May Also Like:
- Table.RemoveRows function
- Table.RemoveColumns function
- Csv.Document – Use Csv.Document in Power Query M to read CSV files.
- Table.ColumnNames – Use Table.ColumnNames in Power Query M to list a table’s column names.
- Table.UnpivotOtherColumns – Use Table.UnpivotOtherColumns in Power Query M to turn columns into rows.
- Table.Unpivot – Use Table.Unpivot in Power Query M to turn columns into rows.
- Excel.Workbook – Use Excel.Workbook in Power Query M to read sheets and tables from a workbook.
- Table.ReorderColumns – Use Table.ReorderColumns in Power Query M to change column order.