Data Cleaning: Headers, Data Types, Splitting & Replacing Values
Overview & Learning Objectives
The Power Query Editor is the mission control room for data transformation in Power BI. Understanding the 4 major workspace zones—the Ribbon tabs, the Queries List on the left, the Data Preview Grid in the center, and the Applied Steps inspector on the right—enables analysts to build bulletproof data pipelines.
- Navigate the 4 primary zones of the Power Query Editor.
- Understand the immutable execution flow of the Applied Steps pane.
- Rename, delete, and reorder transformation steps safely without breaking schema downstream.
Industry Standard
Standard: Analytics leadership at Deloitte requires all Applied Steps in Power Query to be renamed from generic default labels (e.g. "Changed Type1") to descriptive business actions (e.g. "Cast Date & OrderValue Types").
Real-World Example: FreshBake Artisan Patisserie
FreshBake imports morning pastry sales sheets with inconsistent blank rows and unformatted currency strings.
| Step Name | Default Step Text | Descriptive Business Rename | Action Performed |
|---|---|---|---|
| Step 1 | Source | Read_Sales_CSV | Connects to filesystem CSV file |
| Step 2 | Promoted Headers | Promote_First_Row | Uses row 1 as column names |
| Step 3 | Filtered Rows | Drop_Null_Invoice_IDs | Removes blank transaction rows |
| Step 4 | Changed Type | Format_Currency_Numbers | Casts Price to Decimal Number |
Syntax & Core Workflow
Power Query Applied Steps: Click step in right pane -> View data preview at that specific point in time -> Click Gear icon to edit step parameters
Parameters Breakdown
Queries Pane (Left): Lists all loaded data tables, dimension lists, parameters, and supporting helper queries.Formula Bar (Top): Displays the underlying Power Query M formula generating the currently selected step.Data Preview (Center): Displays the top 1,000 rows resulting from the currently active Applied Step.Applied Steps (Right): Sequential transformation pipeline executed top-to-bottom on every scheduled data refresh.
Sample Walkthrough (Q&A)
Question: Can you undo a step in Power Query by pressing Ctrl + Z?
Formula / Action: No; press the red "X" icon next to the step in the Applied Steps pane.
Result: The step is deleted from the execution pipeline.
Explanation: Power Query does not have traditional undo/redo. It maintains an execution stack. To revert an action, you delete or modify the specific step in the Applied Steps list.
Common Mistakes & Limitations
- Reordering steps arbitrarily (e.g. trying to filter a column before the step that renames or promotes it, causing a Step Error).
- Leaving hundreds of tiny redundant steps instead of combining data type changes into a single clean step.
Keyboard Shortcuts
| Action | Windows | Mac |
|---|---|---|
| Open Advanced Editor | Alt -> V -> A | Option -> V -> A |
| Close & Apply Changes | Alt -> H -> C | Option -> H -> C |
Pro Tips & Modern Alternatives
- Click the Gear icon next to an Applied Step to edit its parameters directly in a friendly GUI without rewriting M code.
- Group related staging queries into organized folders in the Queries pane (e.g. Staging, Dimensions, Facts).