Business Intelligence with Power BI

L02 · Power Query I: Shape and Clean

Practice — Hot · The Recipe Review

Skills focus. Reading someone else's recipe critically — every skill from this lesson, turned from doing into judging.

Ungraded. This is a review exercise: you are handed a finished recipe and asked what is wrong with it. In working teams, reviewing queries is as common as writing them.

Scenario

A teammate proudly hands off their cleanup of customer_export.csv before leaving for vacation. "All done — 423 rows, fully cleaned, types set." Their Applied Steps list reads, in this order:

#StepTheir note
1Source · Promoted Headers · Changed Type(automatic)
2Removed Duplicates — Name column only"customers should be unique"
3Replaced Values: Segment, N/Anull (typed as text)"nulled the N/As"
4Changed Type: Joined → Date"dates working"
5Replaced Values: State, TexasTX"fixed the states"

Something should already feel wrong: the lesson's cleanup of this same file ends at 500 rows, and theirs ends at 423.

Your review

  1. Explain the 423. Rebuild their recipe faithfully (yes, including the mistakes) and account for the seventy-seven missing rows. Who are they? Use the time-machine trick — click each step and watch the row count.
  2. Audit every step. For each of steps 2–5, write one sentence: correct as is, incomplete, or wrong — and the concrete consequence downstream. Two of the four contain defects the column profile will confess instantly; one is merely unfinished; think hard about whether step 4's position in the order is an accident.
  3. Write the fix. Rebuild the recipe properly (your Mild recipe is most of it) and list, for the vacationing teammate, the diff: which of their steps you kept, changed, reordered, or removed, and why. Professional tone — this person reviews your queries next month.
Hint — the seventy-seven rows

500 unique rows minus 423 is 77 — a number large enough to be its own clue: in a 500-person file, how rare are shared names, really? Click their Removed Duplicates step and compare the count against the all-columns version from the lesson. Then check whether "Avery Thorne" and "Avery Thorne " (trailing space) survived as a pair, and ask what that means their dedup missed at the same time it was over-deleting.

Reflection

  • The teammate's five steps all ran without a single error message. Which lesson theme is that?
  • What one-minute habit, done before step 2, would have prevented the worst defect?