Forum Discussion
Power Query - Column added in source
I had a similar problem to yours: many new columns in the CSV files in the folder where data is coming from though the old columns also existed with the same names as before: To resolve it, I changed the value for the Columns parameter (from 18 to 39 in my case) as shown in the screenshot below.
I got a warning message as I applied this change but ignored it. Not sure if related but now the query using this data includes the original sample file which does not exist any more within the list for its source (can't remove it) but the missing file does not seem to affect how the query operates or its outcome. I also had to make some changes to the rest of the query so that the new columns are processed correctly.
P.S. I closed and then opened the Excel file with the PQ routine mentioned above and refreshed the queries once more. The reference to the original sample file has disappeared from the source list for the query mentioned above and everything seems to be continuing to work fine as well.
- jRichter_54Nov 08, 2023Copper Contributor
Your mention of changing the number of columns in the advanced editor section worked well for me. I overlooked that part of the code several times. Thank you for sharing your knowledge!