What survives the import of 96 orders?
Reconcile your Excel table to these counts before calculating sales.
- Fully delivered
48 orders - Partly delivered
44 orders - Zero delivered
4 orders
Check your reading
All three groups belong in the order ledger. Removing the four zero-delivery orders also removes their requested quantities from the service calculation.
Open the case files, data dictionary and portfolio challenge
Power Query #2: Import, Clean, Transform & Load Data in Excel
Start at 6:22 as Girvin imports a CSV. Pause after the preview and identify the delimiter, column headings and types Excel has inferred.
- Try it
- Import orders.csv into a new query. Keep order_id as text and count the rows before adding any transformations.
- Check your work
- The order history has 96 rows. Check that one row represents one order and that numeric-looking identifiers retain their original text.
A distributor wants to know how much it delivered and which demand it missed. Start with orders.csv. Each record in this case describes one order for one product. An order placed for four scales remains in the source even when none ships. A sales-only extract would hide that demand.
- Create a workbook. Use Data > From Text/CSV, select orders.csv, and choose Transform Data. In Query Settings name the query Orders. Set order_id, branch and product_id to Text, order_date to Date, and all quantity, UGX and day fields to Whole Number. Inspect the blank delivery days before loading.
- Close & Load to a worksheet. Select the output table and set its Table Design name to Orders. Give its sheet the same name. If Excel asks to rename an already named table, verify the existing name in Table Design first.
- On a Controls sheet record the expected coverage (January to December 2025) and put the four source checks below into separate cells. Format money with a UGX label and whole shillings.
- Filter the table to O01-07. Record its ordered quantity, delivered quantity and blank days beside the checks. Clear the filter before continuing.
=ROWS(Orders[[order_id]])
=MIN(Orders[[order_date]])
=MAX(Orders[[order_date]])
=COUNT(Orders[[days_to_deliver]])Compare with the source
The table has 96 rows, from 2 January to 26 December 2025. There are 92 numeric delivery-day observations. O01-07 has four units ordered, zero delivered and no observed delivery time. A zero inserted in the days field would change the mean.
If the date cells display serial numbers, change their number format. If MIN returns zero or a date filter groups lexically, inspect the source type and locale in Power Query, refresh and repeat the check.