Skip to main content
Albero Academy

Power Query in Excel

Use Power Query inside Excel to clean and combine messy data — connect, transform, and refresh without VBA.

Chapter 3Excel15 min readBeginner friendly
  • #Excel
  • #Power Query
  • #ETL

Power Query in Excel is the same engine that lives in Power BI. Most analysts using Excel for the past 10 years have never opened it — and it would have saved them thousands of hours. This chapter is the catch-up.

Why Power Query in Excel?

  • Repeatable cleanup. Record once, refresh forever. New file? Drop it in the same folder and click Refresh.
  • No VBA. Replaces 80% of the macro recordings analysts inherit but don't understand.
  • Same skills as Power BI. Everything you learn here transfers to Power BI Desktop one-for-one.

Launching the editor

From a blank workbook: Data → Get Data → pick your source. From a Table: Data → From Table/Range.

The editor opens in its own window. The same four panes as Power BI: Queries (left), Preview grid (centre), Applied Steps (right), Formula bar (top).

Cleaning a messy file

The classic scenario: someone sent a "monthly report" Excel file with a logo image, a merged title row, blank rows between sections, and totals at the bottom. Here's the recipe:

  • Home → Remove Rows → Remove Top Rows — strip the title.
  • Home → Use First Row as Headers — promote the proper header row.
  • Right-click "Total" column header → Remove Rows → Remove Bottom Rows.
  • Filter the column for "(blank)" → uncheck → drops the section dividers.
  • Right-click columns → Change Type for date and number columns.
  • Home → Close & Load → drops the cleaned data into a new sheet as a Table.

Combine files in a folder

The single most-loved Power Query feature. You have 12 monthly Excel files with the same structure — combine them in one click.

  • Data → Get Data → From File → From Folder — point to the folder.
  • Click Combine & Transform Data. Power Query auto-builds a function that processes one file, then maps it across all files.
  • The result is one big Table that auto-refreshes when you drop new files into the folder.

Unpivot wide reports

Source data often arrives "wide" — months as columns. For analysis, you want it "tall" — one row per (entity, month, value). Power Query does this in three clicks.

before — wide
Region Jan Feb Mar Apr
North 100 120 140 180
South 80 90 110 130

Select the "Region" column → Transform → Unpivot Other Columns:

after — tall
Region Attribute Value
North Jan 100
North Feb 120
North Mar 140
North Apr 180
South Jan 80
South Feb 90
...

Refresh & connections

  • Refresh All (Ctrl + Alt + F5) — re-runs every query in the workbook.
  • Data → Queries & Connections — see every query, edit it, or refresh individually.
  • Right-click query → Properties — set "Refresh every N minutes" or "Refresh on file open".

Key takeaways

  1. 01Power Query in Excel is the same engine as Power BI — skills are 100% transferable.
  2. 02Replaces 80% of macros for cleaning/combining files. No VBA needed.
  3. 03Combine Files from Folder is the killer feature — drop new files, click refresh.
  4. 04Unpivot Other Columns turns wide reports into analysis-ready tall data.
  5. 05Click any step in Applied Steps to time-travel — never start over from scratch.