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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How can i change first row to headers before combining files?

Hello, I'm new to PowerBi and i ran into a problem. I have a folder with multiple .csv files. Each file has one column name that is the same as all the other files and 3 column names which are unique. These column names are located in the first row of each .csv file.

 

Example: 

file 1

Date, A, B, C

file 2

Date, D,  E, F

file 3

Date, G, H, I

 

All these files are together in one folder. When I load this folder in PowerBi the column names of each column becomes column 1, column 2, column 3, column 4.  I want to combine all files in a way that gives me a table with all column names as headers, not in the first row. But when I combine the files only the column names of the first file get promoted to headers. I want my table headers to look like this:

Date  A  B  C  D  E  F  G  H  I 

 

but now it looks like this:

 

Date  A  B  C

5-9    5  5  5

6-9    8  6  6

Date  D  E  F

5-9    2  8  3

6-9    4  8  9

Date  G  H  I

5-9    4  6  5

6-9    7  2  6

 

Does anyone know how i can promote the first row to headers for each file before combining them all and how to combine all files in a way that shows the unique columns of each file?

4 REPLIES 4
PurpleGate
Resolver III
Resolver III

Ah, then you should try this:

 

1. Combine the files, like you currently are. 

PurpleGate_0-1693913296404.png

2. Go to the power query tab and in the applied steps, delete all the steps until you get to transform file

PurpleGate_1-1693913438926.pngPurpleGate_2-1693913464367.png

 

3. Click expand transform file

PurpleGate_3-1693913486899.pngPurpleGate_4-1693913495254.png

4. then you get all the columns 

PurpleGate_5-1693913543701.png

 

 

Anonymous
Not applicable

if I do that i'm not getting any of my column names just column 1 etc. 

Martijn654_0-1693915036643.png

 

Anonymous
Not applicable

My problem is that i have to much files to load them individualy so i load 1 folder and when i do that, i can not promote headers before combinig them. 

Martijn654_0-1693909323431.png

 

 

PurpleGate
Resolver III
Resolver III

You can promote first rows to headers in the Transform tab.

 

Then in the home tab, you can merge the tables together based on date so all unique columns will appear at the top. 

 

PurpleGate_0-1693906956196.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.