This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
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
Solved! Go to Solution.
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.
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.
Thank you
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 30 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 31 | |
| 23 | |
| 23 |