Courses Learn Blog Contact
Get Started →
Lesson 6

Assignment 1: Clean Sales_2024 on Your Own

Released Day 4, due Day 6. The same five fixes, on a file you have not seen cleaned.

Webbo3 Power BI Cohort 1 6 min read Free

Webbo3 Power BI · Cohort 1 · Assignment 1 · Released Day 4 · Due Day 6

Assignment 1: Clean Sales_2024 on Your Own

The steps you built with the class on Sales_2023, done alone on a sheet you have not seen cleaned.

By the end of today you can

  • Bring Sales_2024 in from the Webbo Oil workbook as its own query
  • Read three date formats correctly, and clean four name columns
  • Replace empty attendants, and remove blank dates, duplicates and impossible quantities
  • Prove each fix with a row count or a distinct count
  • Hand in a .pbix and a short step log that a tutor can check

On Day 4 the class built the cleaning together. This is the same recipe, on the 2024 sheet, with nobody driving the projector.

Sales_2024 has the same nine columns and the same kinds of mess as Sales_2023, but different rows and different amounts of each problem. Copying last week's numbers will not work; repeating last week's steps will.

The Brief

Assignment 1 · Individual · Released Day 4 · Due Day 6

Clean Sales_2024 on your own, using the steps built in class on Sales_2023: read the dates with the right locale, clean the station, product, attendant and payment names so they match the master sheets, mark unmanned sales, and remove blank dates, duplicates and zero or negative quantities.

What we are looking atWe want to see the first rows of Sales_2024 as it arrives, so you know what you are starting from.
Sales_2024, raw
ABC 123TransactionIDABC 123DateABC 123StationNameABC 123ProductNameABC 123AttendantNameABC 123QuantityABC 123UnitPrice_NGNABC 123TotalAmount_NGNABC 123PaymentMethod
1TXN-2024-0023862024-10-13WUSE FILLING STATIONENGINE OIL···Tunde·Danjuma14,510.434,510.43transfer·
2TXN-2024-00218319/09/2024··Independence·Layout·Filling·Station·PMS (Petrol)Ngozi Ogunleye14.6892.2213,026.41POS
3TXN-2024-000452February 21, 2024Independence Layout Filling Stationdpk (kerosene)Chinwe Chukwu39.21,137.2344,579.42POS
4TXN-2024-00222924/09/2024Ikeja Filling StationPMS (PETROL)Chidi Ogunleye21.8876.4919,107.48·POS
5TXN-2024-00251229/10/2024independence layout filling station···PMS·(Petrol)··NGOZI·OGUNLEYE···28.5908.6225,895.67TRANSFER
6TXN-2024-0006672024-03-21Lekki Filling Station···PMS·(Petrol)BISI EZE19.4719.0413,949.38CASH
7TXN-2024-000367February 13, 2024GRA FILLING STATION···ago·(diesel)zainab balogun261,258.532,721·CASH
8TXN-2024-00091822/04/2024ikeja filling stationpms (petrol)··FUNKE·YAKUBU42.1681.9828,711.36CASH
9 COLUMNS, 3,132 ROWS · first 8 shown
What we are checkingWe want the starting numbers you will be measuring your cleaning against.
Sales_2024, before cleaning
Starting pointValue
Rows in the sheet3,132
Different spellings in StationName282
Different spellings in ProductName188
Different values in PaymentMethod24
Empty AttendantName cells311
Empty Date cells9

What You Must Do

#TaskDone when
1In your Day 4 file: Get Data, Excel workbook, tick Sales_2024, Transform Data. Rename the query Sales_2024_CleanSales_2023_Clean and Sales_2024_Clean are both in the Queries pane
2Delete Power BI's Changed Type. Set Date with Using Locale, English (United Kingdom); the three amount columns to Decimal NumberDate shows the DATE badge and 0% errors
3Trim and Capitalize Each Word on StationName, ProductName, AttendantName and PaymentMethodStationName shows 7 values, ProductName 5, PaymentMethod 3
4The five Replace Values fixes: GRA, PMS, AGO, DPK and POSEvery name is spelled as on the master sheets
5Replace null in AttendantName with UnmannedNo empty attendant cells remain
6Remove rows with a blank DateDate shows 0% empty
7Remove duplicates across all columnsThe row count drops, and you know by how much
8Keep only Quantity greater than 0Quantity's minimum in Column profile is above 0
What we are checkingWe want the one number you can check your finished query against. The counts after each step are yours to find.
Self-check
CheckYour query must show
Rows in Sales_2024_Clean at the end3,065
Keep It a Separate Query

Do not add 2024's rows to Sales_2023_Clean. On Day 5 you append the two clean queries properly, and that only works if each one is clean on its own.

What to Hand In

  • Your .pbix file (name it YourName_Assignment1.pbix), uploaded to Google Drive, link set to "Anyone with the link can view".
  • A screenshot of Applied Steps for Sales_2024_Clean, with the final step selected so the row count shows at the bottom of the preview.
  • A step log: a short table in a Google Doc, one line per step and the rows left after it. Example below.
What we are showingWe want to show the shape of the step log, using Sales_2023 so the 2024 answers stay yours to find.
Step log example (Sales_2023)
StepRows afterWhat it fixed
Navigation (Sales_2023) + Promoted Headers3,189Opened the sheet
Changed Type with Locale3,189Dates read day first
Trimmed Text3,189Spaces at the ends
Capitalized Each Word3,189One capitalisation
Replaced Values (GRA, PMS, AGO, DPK, POS)3,189Abbreviations back in capitals
Replaced Value (null to Unmanned)3,189Unmanned pumps named
Filtered Rows (Date is not blank)3,181Sales with no date
Removed Duplicates3,134Logs submitted twice
Filtered Rows (Quantity > 0)3,116Refunds and typing slips

Paste all three links into the Assignment 1 hand-in box. You can edit your hand-in until a tutor marks it.

How It Is Marked

CriterionMarksWhat the tutor checks
Dates read correctly20English (United Kingdom), no errors, no rows lost to Remove Errors
Names cleaned257 stations, 5 products, 3 payment methods, spelled as on the master sheets
Unmanned and blank dates15No empty attendants; no blank dates
Duplicates and quantities20Final row count 3,065
Step log and screenshots20Every step listed, counts match the .pbix

A step log whose numbers do not match your own file loses the step log marks even if the cleaning is right: the log is how you prove your work.

Questions You Will Have

My StationName column shows 21 values. What did I miss?

Capitalize Each Word. Trim fixes the spaces but not the capitals.

Some dates show Error after I changed the type.

The type was changed with your laptop's locale, not English (United Kingdom). Delete that step and use Change Type, Using Locale. Do not use Remove Errors.

Should I delete the rows with no attendant?

No. They are real sales from unmanned pumps. Replace null with Unmanned.

Can I copy my 2023 query and point it at the 2024 sheet?

You can (right-click, Duplicate, then in the Navigation step choose Sales_2024), but then check every step's numbers against the 2024 sheet. The grade is for a clean 2024 table, not a copied recipe.

Tick Before You Move On

  • ☐ Sales_2024_Clean is its own query
  • ☐ StationName shows 7 values, ProductName 5, PaymentMethod 3, and no empty attendants
  • ☐ Date has the DATE badge, no errors and no blanks
  • ☐ My final row count is 3,065
  • ☐ I have the .pbix link, the Applied Steps screenshot and the step log ready

Quick Recap

Same recipe as Day 4, different sheet, done alone. Prove every fix with a count. Keep 2024 as its own query; Day 5 appends them. Hand in the .pbix, a screenshot and a step log, as links.

Final Scenario

On Day 5 your tutor appends everybody's Sales_2024_Clean to Sales_2023_Clean to build one two-year table.

If your 2024 query is clean, the append works first time and every chart after it is right. If it is not, every chart for the rest of the course carries your mistake.

Assignment 1 is small, and everything after it stands on it.

Next, Day 5: appending and merging queries.

Learn this with a real instructor

Free lessons take you a long way on your own. The full programmes add live classes, assignments, Skill Points and a certificate — built for African students.