Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
toplisek
Helper I
Helper I

How to add headers without columns elements?

How to add headers without columns elements? I am testing CSV file. I try to replace Column1, ColumnXXX with the header titles.QueryEditorHeaders1.jpg

2 ACCEPTED SOLUTIONS
Elena_Kalina
Solution Sage
Solution Sage

Hi @toplisek 

1 Using "Use First Row as Headers"(what you're looking for)

- Make sure your first row in the data contains the header titles you want

- In the Home tab, click "Use First Row as Headers" (the table icon with 123 on it)

- This will promote your first data row to become column headers

Elena_Kalina_0-1749712664751.png

2 Manual Renaming

- Right-click on a column header (e.g., "Column1")

- Select "Rename" from the context menu

- Type your desired header name

- Repeat this process for each column individually

3 Using the Created Step from First Rename

- First rename one column manually (this creates a step in the query)

- In the formula bar, modify the generated code to rename all columns at once

The formula should look like:

= Table.RenameColumns(PreviousStep, {{"Column1", "NewName1"}, {"Column2", "NewName2"}, {"Column3", "NewName3"}})

4 Inserting a New Step Before Renaming

- Go to the "Add Step" button or right-click in the query steps pane

- Insert a new custom step

- Use the complete rename formula for all columns:

= Table.RenameColumns(Source, {{"Column1", "Header1"}, {"Column2", "Header2"}, {"Column3", "Header3"}})

Note: Replace "Source" with the name of your previous step if needed, and adjust the column names and new headers according to your data.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

View solution in original post

Nasif_Azam
Super User
Super User

Hey @toplisek ,

To add headers from the first row of a CSV file in Power Query Editor especially when it's currently using default column names like Column1, Column2, etc. 

Steps to Use First Row as Headers

  1. Open Power Query Editor (as shown in your screenshot).

  2. On the Home tab, locate the Transform section.

  3. Click on “Use First Row as Headers”.

    • This option will promote the first row of your data to become the column headers.

    • It is labeled: Use First Row as Headers (right beside the "Data Type: Text" and “Replace Values” buttons).

    • Shortcut: It corresponds to this M code:

      Table.PromoteHeaders(Source, [PromoteAllScalars=true])

Nasif_Azam_0-1749714875363.png

 

If "Use First Row as Headers" is Disabled or Missing

  • You may already have applied it once. In that case:

    • Click on “Advanced Editor” and remove or adjust the previous steps.

  • You can manually promote headers using this line in the Advanced Editor:

    #"Promoted Headers" = Table.PromoteHeaders(PreviousStepName, [PromoteAllScalars=true])

Cleanup Steps

After promoting headers:

  • You might still see rows with old header names like Column1, Column2.

    • Use the “Remove Rows” → “Remove Top Rows” option to delete the top row (if needed).

  • Rename any column manually by double-clicking the column name or using the “Transform → Rename” option.

 

If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.


Best Regards,
Nasif Azam



Did I answer your question?
If so, mark my post as a solution!
Also consider helping someone else in the forums!

Proud to be a Super User!


LinkedIn

View solution in original post

8 REPLIES 8
v-agajavelly
Community Support
Community Support

Hi @toplisek 

Just checking in one last time. Were you able to try out any of the suggestions shared earlier? If your issue is resolved, marking the accepted solution would be a big help to others who might be facing the same scenario.

If you went in a different direction or still need support, feel free to drop a quick update, we’re happy to keep helping.

Regards,
Akhil.

v-agajavelly
Community Support
Community Support

Hi @toplisek 

Thank you so much @rajendraongole1 , @burakkaragoz , @Elena_Kalina , and @Nasif_Azam  for the detailed explanations, that was exactly what @toplisek  needed! The solution you all provided worked perfectly and was spot on. Really appreciate your support and guidance.

------------------------------------------------------------------------------------------------------------------------------
If this response helps, consider marking it as “Accept as solution” and giving a “kudos” to assist other community members.

Regards,
Akhil.




 Thank you for thr mesage! It works.

Hi @toplisek 

If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!

Looking forward to your reply!

Thanks,
Akhil.

 

Nasif_Azam
Super User
Super User

Hey @toplisek ,

To add headers from the first row of a CSV file in Power Query Editor especially when it's currently using default column names like Column1, Column2, etc. 

Steps to Use First Row as Headers

  1. Open Power Query Editor (as shown in your screenshot).

  2. On the Home tab, locate the Transform section.

  3. Click on “Use First Row as Headers”.

    • This option will promote the first row of your data to become the column headers.

    • It is labeled: Use First Row as Headers (right beside the "Data Type: Text" and “Replace Values” buttons).

    • Shortcut: It corresponds to this M code:

      Table.PromoteHeaders(Source, [PromoteAllScalars=true])

Nasif_Azam_0-1749714875363.png

 

If "Use First Row as Headers" is Disabled or Missing

  • You may already have applied it once. In that case:

    • Click on “Advanced Editor” and remove or adjust the previous steps.

  • You can manually promote headers using this line in the Advanced Editor:

    #"Promoted Headers" = Table.PromoteHeaders(PreviousStepName, [PromoteAllScalars=true])

Cleanup Steps

After promoting headers:

  • You might still see rows with old header names like Column1, Column2.

    • Use the “Remove Rows” → “Remove Top Rows” option to delete the top row (if needed).

  • Rename any column manually by double-clicking the column name or using the “Transform → Rename” option.

 

If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.


Best Regards,
Nasif Azam



Did I answer your question?
If so, mark my post as a solution!
Also consider helping someone else in the forums!

Proud to be a Super User!


LinkedIn
Elena_Kalina
Solution Sage
Solution Sage

Hi @toplisek 

1 Using "Use First Row as Headers"(what you're looking for)

- Make sure your first row in the data contains the header titles you want

- In the Home tab, click "Use First Row as Headers" (the table icon with 123 on it)

- This will promote your first data row to become column headers

Elena_Kalina_0-1749712664751.png

2 Manual Renaming

- Right-click on a column header (e.g., "Column1")

- Select "Rename" from the context menu

- Type your desired header name

- Repeat this process for each column individually

3 Using the Created Step from First Rename

- First rename one column manually (this creates a step in the query)

- In the formula bar, modify the generated code to rename all columns at once

The formula should look like:

= Table.RenameColumns(PreviousStep, {{"Column1", "NewName1"}, {"Column2", "NewName2"}, {"Column3", "NewName3"}})

4 Inserting a New Step Before Renaming

- Go to the "Add Step" button or right-click in the query steps pane

- Insert a new custom step

- Use the complete rename formula for all columns:

= Table.RenameColumns(Source, {{"Column1", "Header1"}, {"Column2", "Header2"}, {"Column3", "Header3"}})

Note: Replace "Source" with the name of your previous step if needed, and adjust the column names and new headers according to your data.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

burakkaragoz
Community Champion
Community Champion

Hi @toplisek ,

If you want to add headers to your CSV file in Power Query and you see generic names like Column1, Column2, etc., you can manually set the headers using the "Use First Row as Headers" function (you find it on the Home tab in Power Query). If your CSV doesn't actually have a header row, you can rename the columns one by one:

  1. Right-click each column name (like Column1) and pick "Rename" — then just type whatever header you want.
  2. Or, if you have a fixed list, you can use the Power Query formula bar with something like:
 
= Table.RenameColumns(Source, {{"Column1", "YourHeader1"}, {"Column2", "YourHeader2"}})

Just swap YourHeader1/2 with the names you need.

If you have a lot of columns, let me know, there are ways to automate this too!

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI

rajendraongole1
Super User
Super User

Hi @toplisek  - In the Home tab, click "Use First Row as Headers".This will promote the first row of your table to become column names

rajendraongole1_1-1749711665674.png

 

or 

rajendraongole1_0-1749711620816.png

 

Hope this helps.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.