You choose "Combine" and PQ generates 2 main queries, one function and one parameter. A temporary query is made called Sample File - for analysing the contents by the look of it.
- there's a query for the WHOLE folder (named after the folder name - in my case "sample" ) - it's in the Other Queries group.
- there's a query for individual files (called "Transform file from sample").
- This file level query is used to "Generate a function" for you "fx Transform file from sample"
- the parameter needs to exist in order to generate a function (which is done for you). Beyond that it's only used for test purposes.
You now modify the query called "Transform Sample File from sample" to apply whatever file-level modifications you want (like removing the first 10 rows).
You modify the "sample" query to perform whatever transformations you want once all the data is combined (new columns, filtering, sorting etc)
Thank you for the reply. I did this but the issue is when I add more files to the folder only the top 10 rows on the first file are removed. I need it on every file.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.