Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have read multiple articles that say they provided a solution to the issue I am having but they are not working. I have a Folder that has mulitple CSV Files that are all Formatted the same. I direct Power BI to get these files using the "From Folder" Option. After I choose "Combine & Edit", I then set up all the steps I would like Power BI to perform to each file under the "Transform Sample File from "Folder Name"". The most important and first step which is "Remove Top Row" is only being applied to the Sample File and not every other CSV File in the Folder. It still keeps the top row from every other CSV File in the Folder causing my report to error out when I refresh it. Am I missing a step somewhere or is this not possible with CSV Files? I am downloading these files directly from a FTP so I have no control over the File extension.
Hi @Anonymous ,
You can filter the extension. If you look to the tops applied steps, you can see the metadata about your folder. Just filter the extension there.
The transformations applied to the Sample File are applied to the other tables. Maybe the layout is different for those csv files ?
Can you check it ?
All of the CSV Files are formatted the same because they are Generated automatically from a program. Here is an example of how every file will look. There are many more columns but the first line only has data to Column O
| HDR | 20200517 | INVOICE NUMBER | ACCOUNT NUMBER | COMPANY | ADDRESS | PORTLAND | OR | 97201 | US | INVOICE AMOUNT | 9658 | |
| DTL | 5118831 | 10 | 5.34178E+20 | HANDFUL | USSEA1 | 5341782 | 20200512 | 0 | 4.12121E+15 | 11958533 | 9.37487E+21 | |
| DTL | 5118831 | 20 | 5.34178E+20 | HANDFUL | USSEA1 | 5341782 | 20200512 | 0 | 4.12121E+15 | 11954144 | 9.37487E+21 | |
| DTL | 5118831 | 30 | 5.34178E+20 | HANDFUL | USSEA1 | 5341782 | 20200512 | 0 | 4.12121E+15 | 11958496 | 9.37487E+21 |
I always want to remove this first line off every CSV File because it is not needed. This line is just a summary of the Invoice and does not relate to the rest of the file.
@Anonymous ,
Check this file: Download PBIX
I just created 3 csv, and excluded the 1 row for each file.
Here the files: Download CSV Files
Just change the Source step on the Example CSV:
= Folder.Files("D:\Google Drive\Exemplo PBI\Example CSV") to:
= Folder.Files(YOUR_PATH)
If you are doing the same, please, the m-code applied to both tables (sample and result).
It looks like the issue is related to the Original Type of CSV File that is being downloaded. I was going to send you 2 Sample Files after I removed the personal information but after I resaved the File as CSV again, the transformation in BI worked as expected. I was hoping to find a solution to the problem without having to modify the files first.