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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nicktayl
Helper I
Helper I

Help Importing Multiple Files at Once

Hi,

 

I'm importing data from this location, unzipping all the files to a single folder, then trying to import all the files at once, defining each column's datatype myself to avoid import errors.

 

I used the folder datasource and imported all the files into one table. This returned the binary as a column, the filename as another, file type as another, etc.

 

Next I deleted all columns except for the binary and the filename.

 

I clicked the double arrows to import the data from each of the files.

 

Now I would like to delete all rows where the filename is not the first file and subsequently set the first row as my headers.

 

I'd like to copy this M query script and run it for each of my files, changing the criteria for the "delete rows" function.

 

My question is does a delete row function exist? Is there an easier way to do what I'm trying to do? I tried filtering on the filename and then setting the first row as my column header, however after setting the first row as my header, the filter indicator on the filename column has disappeared.

 

Apologies because I am brand new to Power BI, but am familiar with VBA and SQL.

 

Kind Regards

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @nicktayl

 

If I understand you correctly what you should do is to first filter the data, then promote the headers.

 

After which you can then copy the M to the other sheets.

 

 





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

Proud to be a Super User!







Power BI Blog

View solution in original post

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @nicktayl

 

If I understand you correctly what you should do is to first filter the data, then promote the headers.

 

After which you can then copy the M to the other sheets.

 

 





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

Proud to be a Super User!







Power BI Blog

Thank you

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.