Excel Lesson 26 – Power Query Introduction | Dataplexa
Lesson 26 · Power Query Theory + Practical

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.

The ETL Flow — Extract, Transform, Load
Extract
Connect to data
CSV files
Excel workbooks
Databases
Web pages
SharePoint
APIs
Transform
Clean and reshape
Remove duplicates
Fix data types
Split columns
Filter rows
Merge tables
Unpivot
Load
Deliver to Excel
Excel Table
PivotTable
Data Model
Connection only
(for Power Pivot)
When data changes → click Refresh → all steps replay → clean output lands in grid automatically

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.

Data Tab — Get & Transform Data Group
Home
Insert
Data
Review
View
Get & Transform Data
📂
Get Data
All sources
📄
From Text/CSV
Most common
📊
From Workbook
Another .xlsx
🌐
From Web
URL or API
Also:
Queries & Connections pane (right side) → manage existing queries · right-click → Edit

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.

Power Query Editor — Four Key Areas
Power Query Editor
Close & Load ↓
① Queries Pane
SalesData
Employees
All queries in the workbook. Click to switch between them.
② Data Preview
Rep Region Sales
PriyaNorth119000
JamesEast117000
Live preview of data at current step. Changes as you apply transformations.
③ Applied Steps (right side)  &  ④ Formula Bar (top)
= Table.SelectRows(#"Changed Type", each [Region] = "North")
Source
Promoted Headers
Changed Type
Filtered Rows
Every action is recorded as a step. Click any step to see data at that point. Delete a step to undo it.

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
CSV loaded → cleaned → Excel Table in new sheet → refreshes automatically when file changes

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.

A Typical Applied Steps List for a CSV Import
Applied Steps
📂
Source
Connect to sales_data.csv
auto
📋
Promoted Headers
Row 1 → column names
auto
🔢
Changed Type
Sales → Whole Number, Date → Date
auto
🗑️
Removed Columns
Dropped "Internal_ID", "Legacy_Code"
you
🚫
Removed Blank Rows
Cleaned empty rows at bottom
you
Filtered Rows
Region = "North" only
current

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
💡 Teacher's Note
One thing that trips people up early in Power Query: the transformations you apply happen in the editor and are only committed to the workbook when you click Close & Load. Until you close the editor, nothing has changed in your Excel file. And until you click Refresh (after the initial load), your output table does not update when the source file changes. Getting into the habit of clicking Refresh All at the start of each work session — especially for workbooks connected to external files — is one of the simplest discipline habits that prevents a lot of "why are my numbers wrong" moments.

🟠 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.