Skip to the workspace
Pebellslearn by building
Cleaning Data with Power Query  ›  Lesson

Applied Steps

Applied Steps 12 minEvery transformation in Power Query is saved as a named step, and each refresh replays the steps in order, each one working on the output of the step above it.

power bi / Applied Steps

Explore each scene at your own pace.

01 · The rule

The rule

Applied Steps

Arjun spends twenty minutes cleaning January's Pune export: dropping a column nobody needs, removing test rows, fixing types. In February a new file arrives. If Power Query were an ordinary editor, he would repeat all twenty minutes, every month, forever. It is not an ordinary editor: it wrote down every click.

The rule

Every click becomes a step; every refresh replays the steps in order.

The Power Query Editor opens when you choose Transform Data. Its parts:

  • Queries pane (left): one query per table you are shaping.
  • Preview (centre): a sample of the data as it looks at the selected step.
  • Formula bar (top): the code for the selected step, written in the M language.
  • Query Settings (right), with the Applied Steps list.

Each transformation you make adds a named step to the list. Together the steps are a recipe. At refresh, Power Query re-reads the source and runs the recipe from top to bottom, so February's file gets exactly the treatment January's did. The source itself is never changed: Power Query reads it, reshapes the data on the way in and loads the result.

Arjun's Sales query:

# Step What it does
1 Source Reads the CSV file
2 Promoted Headers Turns the first row into column names
3 Changed Type Sets each column's data type
4 Removed Columns Drops the Cashier column
5 Filtered Rows Removes rows where Store is TEST

Working with steps:

  • Click a step to see the data as it was at that moment — a time machine through your own work.
  • Right-click a step to rename it (give it a name that says why), delete it, or delete it and everything after it.
  • Click the gear beside a step to reopen its settings dialog.
  • Select a step and add a transformation, and Power Query inserts the new step right after it, asking first because later steps may be affected.

The formula bar for step 5 reads:

= Table.SelectRows(#"Removed Columns", each [Store] <> "TEST")

Notice that it names the step above it. That is how the recipe is chained together.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.