Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
How to add headers without columns elements? I am testing CSV file. I try to replace Column1, ColumnXXX with the header titles.
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.
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.
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.
Open Power Query Editor (as shown in your screenshot).
On the Home tab, locate the Transform section.
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])
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])
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
Hi @toplisek
- 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
- 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
- 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"}})
- 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.
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:
= 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
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
or
Hope this helps.
Proud to be a Super User! | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
77 | |
74 | |
57 | |
40 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |