Lab 2 — Data Import & Cleaning with Store Sales Orders
Goal
Use Microsoft Excel's Power Query (Get Data) to import the Store Sales Orders dataset, diagnose and fix data quality issues, and load a clean, analysis-ready table. This lab is Excel-specific — Power Query is not available in Google Sheets.
Data
Lab2-StoreOrders.csv and Lab2-StoreOrders.xlsx — download from Google Drive.
Variables: OrderID (Text), OrderDate (Date — stored as text in source), Customer, Category, Amount (Decimal — some stored as text), Quantity (Integer — some stored as text), Region, Notes.
Intentional data quality issues for practice:
- Duplicate rows
- OrderDate, Amount, Quantity stored as wrong types
- Leading/trailing spaces in Customer, Category, Region
- Inconsistent Category values (e.g. "ELECTRONICS", " electronics ")
- Blank rows and missing values in Region and Notes
Tasks
Part A — Import
- Import
Lab2-StoreOrders.csv: Data → Get Data → From File → From Text/CSV → Transform Data. - Import
Lab2-StoreOrders.xlsx: Data → Get Data → From File → From Excel Workbook → select the Orders sheet → Transform Data. - Use either source for Parts B–D; close the other with Close & Load To… → Only Create Connection.
Part B — Transformations
Apply all of the following in the Power Query Editor (each becomes one Applied Step):
- Change types: OrderDate → Date (choose correct locale if prompted), Amount → Decimal Number, Quantity → Whole Number.
- Remove Duplicates: Home → Remove Rows → Remove Duplicates (use all columns or OrderID alone — note the difference).
- Replace Values: standardise Category — replace "ELECTRONICS", " electronics ", "ELECTRONICS ", etc. with "Electronics". Repeat for other categories as needed.
- Trim & Clean: Transform → Format → Trim on Customer, Category, and Region. Apply Clean if non-printable characters are suspected.
- Remove Blank Rows: Home → Remove Rows → Remove Blank Rows. Note the before/after row count.
Part C — Missing values
- Remove Blank Rows (already done in B5 — confirm the count).
- Flag missing Notes: Add Column → Conditional Column → name it
Notes_Missing; set to"Yes"if Notesequalsnull oris blank, otherwise"No". - Document your strategy: In one or two sentences in your submission, state how you handled missing values in Region and Notes.
Part D — Load and refresh
- Load to worksheet: Close & Load → the cleaned table appears as an Excel table on a new sheet. Rename the query
StoreOrders_Cleaned. - Refresh: Make a small change to the source CSV (add one row), save, then Data → Refresh All. Confirm the new row appears.
Submission
Submit one Excel workbook (.xlsx) to the LMS:
- A sheet with the cleaned
StoreOrders_Cleanedtable (loaded from Power Query). - The Queries & Connections panel visible (or a screenshot) showing the query steps.
- A text cell or comment documenting your missing-value strategy.
Group Progress Report 2 is also due this week. Submit separately:
- Data quality report (missing values, outliers, inconsistencies)
- Cleaning methodology (decisions made and rationale)
- Cleaned dataset with data dictionary (1–2 pages + Excel file)