Excel Course
Power Query Introduction
Everything in this course so far has lived inside the Excel grid — formulas, functions, and dynamic arrays all working on data that already sits in cells. Power Query is something different. It is a dedicated data transformation engine built into Excel that sits one step upstream from the grid. Its job is to connect to data sources, clean and reshape that data, and load the result into Excel as a table — automatically, repeatably, and without a single formula. If you have ever spent an hour cleaning a CSV export by hand, or re-run the same copy-paste-reformat routine every month, Power Query is what eliminates that work entirely.
What Power Query Is — and What It Is Not
Power Query is not a formula. It is not a function you type into a cell. It is a separate editor — a point-and-click ETL tool (Extract, Transform, Load) — where you build a series of transformation steps on your data. Each step is recorded as a query. When you click Refresh, Power Query replays every step automatically on the latest version of the data and delivers the result into the grid.
Excel workbooks
Databases
Web pages
SharePoint
APIs
Fix data types
Split columns
Filter rows
Merge tables
Unpivot
PivotTable
Data Model
Connection only
(for Power Pivot)
Where to Find Power Query
Power Query lives on the Data tab. The main entry points are in the Get & Transform Data group. Once a query has been created it also appears in the Queries & Connections pane on the right side of the screen.
The Power Query Editor
When you connect to a data source, Power Query opens in its own editor window — separate from the Excel grid. This is where all transformation work happens. The editor has four main areas you need to know.
| Rep | Region | Sales |
|---|---|---|
| Priya | North | 119000 |
| James | East | 117000 |
Your First Query — Importing a CSV File
The most common starting point is a CSV or text file export from another system — a payroll export, a CRM download, a sales report. Here is the full walkthrough from connection to loaded table.
Step 1 — Connect to the file
Data tab → Get Data → From Text/CSV → browse to your file → Import
Step 2 — Preview and confirm
Power Query shows a preview of the file. Check:
- Are column headers on row 1? (if not → Transform → Use First Row as Headers)
- Are data types correct? (numbers showing as text?)
Click: Transform Data (to open the editor) or Load (to load directly)
Step 3 — Apply transformations in the editor
Each action in the editor adds a step to Applied Steps.
Common first steps:
- Home → Use First Row as Headers
- Click column header → Change Type (number, date, text)
- Right-click column → Remove (to drop unwanted columns)
- Home → Remove Rows → Remove Blank Rows
Step 4 — Load to Excel
Home tab (in editor) → Close & Load → Load
Options:
- Table (default — loads into an Excel Table in a new sheet)
- PivotTable (loads directly into a PivotTable)
- Connection Only (keeps query available for Power Pivot / Data Model)
Step 5 — Refresh
When source data changes: Data tab → Refresh All
Or right-click the table → Refresh
Applied Steps — The Query Recipe
The Applied Steps panel is the core concept that makes Power Query so different from manual data cleaning. Every transformation you apply — filtering rows, changing a data type, removing a column — is recorded as a named step. The steps form a recipe that Power Query replays from top to bottom every time you refresh. You can reorder steps, delete steps, and click any step to inspect the data at that point. Nothing is destructive.
Power Query vs Formulas — Choosing the Right Tool
Power Query and Excel formulas solve some of the same problems but in fundamentally different ways and at different scales. Understanding when to use each saves a lot of time and avoids building the wrong solution.
| Situation | Formulas | Power Query |
|---|---|---|
| Data lives in the Excel grid already | ✅ Natural choice | Works but overkill |
| Importing from CSV, database, or web source | ❌ Not designed for this | ✅ Built for this |
| Repeatable monthly data refresh | Manual re-run | ✅ One click Refresh |
| Combining 12 monthly sheets into one table | VSTACK — possible | ✅ Folder connector |
| Unpivoting crosstab data to rows | ❌ Very difficult | ✅ Two clicks |
| Dynamic calculations on live grid data | ✅ Natural choice | Static until Refresh |
| Merging two tables by a key column | XLOOKUP — possible | ✅ Merge Queries |
🟠 Practice
Q1. What are the three stages of the ETL process that Power Query follows? Name them in order.
Q2. In the Power Query Editor, where is every transformation step recorded, and what can you do with those steps?
Q3. You have connected to a CSV file and built a query. The source file is updated every week. What do you click in Excel to pull in the latest data without re-building the query?
🟣 Quiz
Q1. What does the Applied Steps panel in Power Query represent?
Q2. Which Excel tab contains the Power Query data connection tools?
Q3. You want to combine 12 monthly CSV files — one per month — into a single table that updates when new files are added. What is the most appropriate approach?
Next up — Transforming Data in Power Query, where we go hands-on with the most important transformation operations: changing types, splitting columns, filtering, replacing values, and reshaping tables with pivot and unpivot.