Ravindra BagaleCourses & study guides मराठी Track your progress

10. Power Query in Excel

10.2 Cleaning Steps in Power Query

Everything from Module 5 is available as buttons – and recorded as repeatable steps.

Problem Power Query command
Extra header lines Home › Reduce Rows › Remove Rows › Remove Top Rows, then Use First Row as Headers
Duplicates select key column(s) › Home › Reduce Rows › Remove Rows › Remove Duplicates
Blank rows Remove Rows › Remove Blank Rows
Fill down report-style blanks Transform › Fill › Down
Spaces / case Transform › Format › Trim / Clean / lowercase / UPPERCASE / Capitalize Each Word
City spellings Transform › Replace Values, or merge with a mapping table (10.5)
₹ and commas in amounts Replace Values ₹ → blank, , → blank, then type Fixed decimal number
Split columns Home › Split Column › By Delimiter
Merge columns select columns › Transform › Merge Columns
Extract parts Transform › Extract › Text Before/After Delimiter, First/Last Characters
Conditional column Add Column › Conditional Column
Column from examples Add Column › Column From Examples (like Flash Fill, but refreshable)
Errors right-click column › Replace Errors or Remove Errors

About this data: Teaching sample for a fictional shop “Summit Schools”. Figures and names (e.g. Aarti Kulkarni) are made up for this lesson on cleaning steps in power query.

Steps in Excel – working with Applied Steps

  1. Click any step to see the data at that point.
  2. Rename steps (right-click › Rename) to meaningful names like Trim City.
  3. Delete a wrong step with the ✕; insert a step in the middle by selecting the step before it.
  4. Home › Advanced Editor shows the whole query as M code.

Worked example – the Module 5.18 export in Power Query: Promote headers › Uppercase Order ID › Remove Duplicates on Order ID › Replace . with - in Date and change type using locale English (India) › Merge with CityMap for City › Capitalize Each Word on Customer and Status › Replace ₹, Rs., , in Amount and set type › Close & Load. Next week: paste the new file in the same folder and Refresh.

Ravindra Bagale's Tip

When a step goes wrong in Power Query, many students rebuild the whole query. There's no need – select the wrong step and delete it, or change its settings with the gear icon. And rename your steps: "Fix Aurangabad name" is much easier to understand than "Replaced Value3".

Worked example — cleaning steps in power query

Why

Neha Shah in Pune and Sophie Martin abroad both need a clear, repeatable way to use cleaning steps in power query on a GreenField Dairy sheet without breaking totals.

What

Cleaning Steps In Power Query is the Excel idea this page teaches. We will walk one tiny example end to end.

How

  1. Open a blank sheet. In A1 type a short label for cleaning steps in power query.
  2. Enter a small made-up value for Neha Shah using € where money appears.
  3. Add a second value for Sophie Martin using ₹ so you see mixed currencies stay numeric.
  4. Apply the method from this lesson step by step (menu or formula as shown above).
  5. Check the result still works inside SUM or a simple check cell.

Formula / action

Follow the formula or ribbon steps shown in this lesson (keep values numeric).
Result: The demo cell shows the expected result for GreenField Dairy's sample row.
Meaning: Once cleaning steps in power query is correct on one row, copy the same pattern down the column.

Practice tasks (10+)

Try these on a blank sheet. Open a hint only if you are stuck. No quiz — just practice.

1. Rebuild the smallest example of cleaning steps in power query on a blank sheet for Orbit Logistics.

Hint: Use only the steps on this page. Keep numbers numeric.

2. Change one input for Vikram Rao and confirm the result updates.

Hint: If the result is stuck, check absolute vs relative references.

3. Repeat the same steps with a £ or € value for Liam Murphy.

Hint: Formatting must not break SUM.

4. Write the result meaning in one plain sentence next to the cell.

Hint: Imagine explaining it to a new joiners.

5. Add a second row and fill the method down.

Hint: Double-click the fill handle if the pattern is consistent.

6. Break the example on purpose, then fix it using this lesson.

Hint: Common break: text instead of a number.

7. Apply cleaning steps in power query to a 5-row made-up Orbit Logistics table.

Hint: Keep column headers clear.

8. Check your answer with a simple total or COUNT.

Hint: A wrong total usually means a format or key mismatch.

9. Swap ₹ and $ on one column and re-check totals.

Hint: Stored values stay the same; only the display changes.

10. List two mistakes beginners make with cleaning steps in power query.

Hint: Look back at the tip box on this page.

11. Teach the steps out loud in under one minute.

Hint: Why → What → How.

12. Save the sheet as OrbitLogist_practice.xlsx.

Hint: Use a clear file name for class.

Loading practice tasks...

  1. Rows in the import (Easy): How many rows are in the Order ID column?
  2. Clean one customer name (Easy): Remove the extra spaces from the first Customer name.
  3. Fix the case of a city (Easy): Show the first City in normal case, like "Pune".
  4. Total quantity (Easy): Add up the Qty column.
  5. How many spaces were extra? (Medium): How many extra spaces does the first Customer name have?
  6. Duplicate order check (Medium): How many times does Order ID "ORD-502" appear?
  7. Orders from one city, any case (Medium): How many rows have City "Mumbai", in any case?
  8. Amount by channel (Medium): Add up the Amount column for rows where Channel is "App".
  9. Average order amount (Medium): Find the average of the Amount column, rounded to 0 decimals.
  10. Rows after Remove Duplicates (Hard): How many rows are left after the extra copies of "ORD-502" are removed?
  11. Biggest store order (Hard): What is the largest Amount where Channel is "Store"?
  12. Price per unit (Hard): For the first row, divide Amount by Qty.

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Cleaning Steps In Power Query?
Card 1: What is Cleaning Steps In Power Query? · Download PNG
Revision card 2: Tiny example — Cleaning Steps In Power Query
Card 2: Tiny example — Cleaning Steps In Power Query · Download PNG
Revision card 3: Checklist — Cleaning Steps In Power Query
Card 3: Checklist — Cleaning Steps In Power Query · Download PNG