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

15. Final Project: FreshGo Maharashtra Monthly Report

15.2 Stage 1 – Clean the Raw Export

Steps in Excel (choose formulas or Power Query)

  1. Formula route (Module 5.18): copy Raw_Orders to Clean › helper columns: =UPPER(TRIM(A2)) for Order ID, =PROPER(TRIM(C2)) for City, a mapping-table lookup to change Aurangabad → Sambhaji Nagar, =VALUE(SUBSTITUTE(SUBSTITUTE(H2,"Rs.",""),",","")) for Amount, date fix with DATE or Text to Columns (DMY).
  2. Remove duplicates: Data › Data Tools › Remove Duplicates on Order ID after the IDs are standardised.
  3. Missing values: leave blank Delivery Mins blank and flag them (=IF(I2="","Missing","")) – don't type 0.
  4. Power Query route (Module 10): Data › Get & Transform Data › From Table/Range › Trim, Clean, Capitalize Each Word, Replace Values, Change Type with Locale (English (India)), Remove Duplicates › Close & Load To… a Table.
  5. Reconcile (ताळमेळ): row count before/after, duplicates removed, total Amount before/after (Module 5, golden rules).

Worked example – reconciliation box.

Check Raw Clean Comment
Rows 412 405 7 duplicates removed
Distinct cities 11 spellings 6 Mapping applied
Amount stored as text 38 0 Converted
Missing Delivery Mins 9 9 (flagged) Not filled with 0

About this data: Teaching sample for a fictional shop “CityBasket Retail”. Figures and names (e.g. Meera Joshi) are made up for this lesson on stage 1 clean the raw export.

Ravindra Bagale's Tip

Many students run Remove Duplicates first and clean the Order ID afterwards – "blk-9001" and "BLK-9001" are treated as different and the duplicate stays. Remember the order: standardise first (TRIM, UPPER, PROPER), then duplicates. And always build a reconciliation table – interviewers love it.

Practice task

Clean Raw_Orders by either route, fill in the reconciliation table with your real counts, and save the clean data as a Table named tblOrders.

Loading practice tasks...

  1. Total quantity (Easy): Add up the "Quantity" column. (sheet "Data")
  2. Average unit price (Easy): Average of the Unit price ($) column, rounded to 2 decimals. (sheet "Data")
  3. Rows in Website (Easy): How many rows have Channel "Website"? (sheet "Data")
  4. Largest quantity (Easy): The largest value in the "Quantity" column. (sheet "Data")
  5. Clean name (Easy): Trim the "Name" value in the first row. (sheet "Text")
  6. Proper case (Easy): the "Name" value in the first row trimmed and in proper case. (sheet "Text")
  7. Code prefix (Easy): First 3 characters of the "Channel" value in the first row. (sheet "Text")
  8. Code number (Easy): Last 4 characters of the "Channel" value in row 3. (sheet "Text")
  9. Quantity for Website (Medium): Total of the Quantity column where Channel is "Website". (sheet "Data")
  10. Website in Austin (Medium): Total of the Quantity column where Channel is "Website" and City is "Austin". (sheet "Data")
  11. City part (Medium): Characters 5 to 7 of the "Channel" value in row 4. (sheet "Text")
  12. Name length (Medium): Length of the "Name" value in row 3. (sheet "Text")

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 Stage 1 Clean The Raw Export?
Card 1: What is Stage 1 Clean The Raw Export? · Download PNG
Revision card 2: Tiny example — Stage 1 Clean The Raw Export
Card 2: Tiny example — Stage 1 Clean The Raw Export · Download PNG
Revision card 3: Checklist — Stage 1 Clean The Raw Export
Card 3: Checklist — Stage 1 Clean The Raw Export · Download PNG