Forum Discussion
Adjust columns in csv before combining?
I have a folder full of csv files which I am currently combining by adding a folder as a data source. The files are exports from an order report (files are by month and year). For 2022, the order report has one extra column so when I refresh I get an error:
6 Replies
- menglaro78
Microsoft Employee
Hello,
if you used Folder as your data source, surely Power Query created the structure to combine the data.
In doing so, it creates the sample transformation based on the first file it finds in the folder.
That's the place to add your new column and get it over to the rest of the Power Query.
Marco- rpmmRegular Visitor
I don't see the helper queries on the left. I only see the main query which does not have a place to set the combination sample file.
- mangaus1111
Solution Sage
Hi rpmm ,
from this window, instead of choosing the first file as sample, choose one of the files that have the maximum number of columns.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- rpmmRegular Visitor
I don't see this window. Is it because my files are being combined as Binary?
- menglaro78
Microsoft Employee
The photo shown by mangaus1111 you see it only when the first time you select the folder as a data source.
Is it possible share your file ?
Marco