Yes, there is a difference between "Use First Row as Headers" and "Use Headers as First Row" in Power Query Editor, and the difference is important when you are shaping your data.
What do these two options do?
- Use First Row as Headers: Turns the very first row of your data into the column headers.
- Use Headers as First Row: Takes the current column headers and inserts them back as the first row of data, converting the headers into normal data values.
Example to illustrate the difference
Suppose you have the following data loaded into Power Query (this is before applying any transformation):
| Column1 | Column2 | Column3 |
|---|
| Name | Age | City |
| Alice | 25 | NYC |
| Bob | 30 | LA |
1. Applying Use First Row as Headers
You select "Use First Row as Headers".
What happens?
- Power Query treats the first row (
Name, Age, City) as the column headers.
- The original first row is promoted as headers.
- The data shifts:
| Name | Age | City |
|---|
| Alice | 25 | NYC |
| Bob | 30 | LA |
2. Assuming your current table has headers: Name, Age, City with Alice and Bob rows, if you apply Use Headers as First Row:
Starting from this table:
| Name | Age | City |
|---|
| Alice | 25 | NYC |
| Bob | 30 | LA |
You click "Use Headers as First Row".
What happens?
- The headers (
Name, Age, City) are inserted back as the first row.
- The columns become the default generic headers again (Column1, Column2, Column3).
Result:
| Column1 | Column2 | Column3 |
|---|
| Name | Age | City |
| Alice | 25 | NYC |
| Bob | 30 | LA |
Summary Table:
| Action | Effect | Example outcome (based on initial data) |
|---|
| Use First Row as Headers | Makes first row the header row | Headers = Name, Age, City; data starts from Alice row |
| Use Headers as First Row | Moves headers into first data row | Columns revert to generic names (Column1, Column2, etc.); previous headers become first row |
When to use?
- Use "Use First Row as Headers" when you want to promote data row to headers (common when headers come in as a data row).
- Use "Use Headers as First Row" when you want to revert headers back to rows (sometimes done if you need to clean up or manipulate headers as regular data).
If you'd like, I can also provide Power Query M code examples!