FormulaCamp
Completed
9. Power Query · Sources, Errors, and M · 25 min

5. Power Query: Importing CSV, Folders, and the Web

Lesson 5 of 8
Task 1 of 3
  1. Create a query from the file "march_sales.csv" and change the type of the "Amount" column to "Decimal Number".

Lesson theory

Power Query's real strength is connecting to a source that keeps changing: Data › Get Data →

  • From Text/CSV — pick the file, the encoding (65001: UTF-8) and the delimiter; the first row becomes the headers;
  • From Folder — all files of the same layout in a folder are combined into one table ("Combine & Transform"). Drop in a new file, click "Refresh";
  • From Web — a table from a web page, or JSON from a URL.

Everything from a CSV arrives as text. Values like "n/a" and "—" turn into errors when you change the type to a number — replace them with 0 or remove those rows.

In the trainer the file is already "picked": the query source is the March sales CSV file (the sheet is empty — the result loads into A1). The trainer doesn't open folders or web sources.

In the trainer, the Power Query editor sits under the sheet. Pick a source, add steps with the "+ Step" button, and check the result after each step (click a step in the "Applied Steps" list). The M formula of the step is shown above the preview. Remove a wrong step with "Delete last step".

Practice is part of Pro

The live spreadsheet, task checking and .xlsx files in all 170 lessons. Your progress is saved in this browser; sync across devices is coming soon.