Forum Discussion
Add Excel Data Source with Additional Columns
- 5 years ago
You can see the M code in the Advanced Editor in Power Query (right click on any query, click "Advanced Editor". If you used the official merge option there will be a new section with a ingestion function and a sample file reference. Walk through the generated code, and find the place where it mentions the sample file (for the headers). Usually it is the first file in your list.
That may actually give you an in. When you list the items in the sharepoint folder, sort them in a way that newer files come first. Then the merge code will pick up the new structure (and gracefully merge the older files even if they are missing the new column).
Are you pulling data from Excel sheets, tables, or ranges?
Check your merge code, it uses "the first" file by default as a template ("Sample File") to get the list of headers and ingest all the other files. You can change the Sample file pointer to point to your new file, or you can rewrite the Power Query to not use sample files at all.
Do you actually need that new column?