
📎 This article includes 3 downloadable practice files ↓
Every query you build has the full path baked into its Source step. Move the folder, or send the file to a colleague, and every query breaks. Put the path in one place.
Option A: a named cell (best for sharing)
- In a sheet, type the folder in a cell, e.g.
D:\PQ\, and name the cellFolderPath(Name Box). - In each query’s Advanced Editor, add at the top:
Folder = Excel.CurrentWorkbook(){[Name="FolderPath"]}[Content]{0}[Column1],
Source = Csv.Document(File.Contents(Folder & "invoices.csv"), [Delimiter=",", Encoding=65001]),
A colleague types their own path in the cell and clicks Refresh All.
Option B: a parameter
Home > Manage Parameters > New: name Folder, type Text, current value D:\PQ\. Use Folder & "invoices.csv" in the Source step. Change it any time from Manage Parameters.
Type early
The lesson’s query filters [Date] >= #date(2026, 8, 1). That only works after Table.TransformColumnTypes turns the text into real dates; comparing text dates gives wrong results silently.
Practice
Unzip the source files (e.g. to D:\PQ\). Try to build the query with the ribbon first, then compare with the M solution and the expected result. Every solution was run by Excel’s own Power Query engine before publishing.
📎 Practice files for this article
⬇ Download all 3 files (ZIP · 8 KB)
- 🗂️Practice source files (zip)All messy CSVs for the course: invoices, payments, typed customer names, credit history, contacts, branch files, a two-row-header report and an ERP register.⬇ ZIP · 3 KB
- 📄Lesson 1 M solutionThe full query. Paste into Advanced Editor and change the Folder line.⬇ PQ · 784 B
- 📗Expected resultWhat the query returned when Excel ran it, to compare with yours.⬇ XLSX · 5 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.