Business Intelligence with Power BI

L02 · Power Query I: Shape and Clean

Assignment A02 — The Export That Fights Back

Skills assessed. Column profiling · remove duplicates · Trim · Replace Values and true nulls · standardizing categorical values · type changes with error handling.

Submit: A02_LastFirst.pbix. Worth 20 points. The grader inspects the loaded table's actual state — your recipe is judged by what it produces.

Scenario

Marketing's customer_export.csv is now officially yours to own: every month a new version arrives with the same defects, and your recipe — not your mouse — will be what cleans it. Build the recipe once, correctly, and Wednesday-you never thinks about it again.

Requirements

Import customer_export.csv via Transform Data and record a recipe that leaves the loaded table in exactly this state:

  1. 500 rows — exact duplicate rows removed (all columns selected; the raw file has 514).
  2. No leading or trailing spaces in the Name column.
  3. Segment contains no "N/A" text — those 22 cells are true nulls. (The column profile should report exactly 22 empty.)
  4. State holds exactly 26 distinct values, all two-letter codes — the four spelled-out states standardized to TX, CA, NY, MI.
  5. Joined is typed Date with zero error rows. Three text formats are present; if your locale leaves errors after a plain type change, use Using Locale on the stubborn format. Your machine's error count must end at zero — check it, don't assume it.
  6. One visual on the report page: a card counting distinct customers — it must read 500.
What the grader reads The grader loads your .pbix and inspects the resulting table: row count, distinct state values, presence of "N/A" text, whitespace in names, the Joined column's type, and the card. It does not care which steps you used — only that the recorded recipe produces this exact state. A file where you "fixed" things by exporting to Excel and re-importing will fail requirement 5's type check and, more importantly, the point of the lesson.

Checklist (what the grader checks)

#CheckPoints
1Loaded table has exactly 500 rows4
2No Name values with leading/trailing whitespace3
3Segment: zero "N/A" text values; 22 nulls4
4State: exactly 26 distinct values, no spelled-out names4
5Joined typed as Date, zero error rows3
6Card shows distinct customer count = 5001
7File named A02_LastFirst.pbix1

Before you submit

  • Re-open the column profiles and read them like a grader: Segment shows 22 empty, State shows 26 distinct, Joined shows 0% error. Those three panes are your pre-submission checklist.
  • Close & Apply, then confirm the card reads 500 — if it reads 514, the recipe never ran.
  • Save, close, reopen, verify. Same ritual as A01, same reason.