
📎 This article includes 2 downloadable practice files ↓
In this article
Twelve monthly files, or one file per branch, all with the same columns. Copy-pasting them into one sheet is slow and error-prone. Power Query’s From Folder combines every file in a folder, and next month you just drop the new file in and click Refresh.
Append: stack two or three queries
Home › Append Queries › Append Queries as New › choose the tables. Columns are matched by name, not position; a column only in one table fills with nulls for the others. Good for a few fixed sources.
From Folder: combine everything
- Unzip the practice file so you have a
monthlyfolder with six CSVs. - Data › Get Data › From File › From Folder › select the folder.
- Click Combine › Combine & Transform Data.
- Choose the sample file and delimiter; OK.
Power Query creates helper queries (a sample file, a “Transform File” function) and one combined query with a Source.Name column holding each row’s file name. 180 rows from 6 files.
Clean once, apply to every file
To change how each file is read (remove top rows, fix headers), edit the Transform Sample File query, not the combined one. Its steps run on every file.
Keep out the wrong files
In the combined query’s early steps, filter the Extension column to .csv and the Name column to begin with “sales_”. Otherwise a stray Excel lock file (~$…) or a notes.txt breaks the refresh.
Next month
Save the October file into the folder, Refresh All, done.
Where beginners go wrong
| Problem | Fix |
|---|---|
| Header row repeated in the data | Promote headers in the Transform Sample File query |
| Refresh fails on an open file | Close the source files; filter out ~$ temp files |
| Folder path different on a colleague’s PC | Use a SharePoint/OneDrive folder (From SharePoint Folder) |
More: combine files from a folder.
Practice
Download the source file(s) and the expected-results workbook below. Build the query in Excel (Data › Get Data), load it to a sheet, and compare your row count and totals with the Checks sheet.
📎 Practice files for this article
- 🗂️pq-monthly-files.zipSix monthly sales CSVs (Apr-Sep 2026) in a folder; unzip first.⬇ ZIP · 4 KB
- 📗Expected resultsWhat your query should produce, with check totals.⬇ XLSX · 6 KB
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
Stuck on a step? Ask a question and the AI answers using this article.