Power QueryExercises

Keep order numbers' leading zeros (kite shop)

Type a CSV so order numbers stay text (0007, not 7) while quantities and prices become numbers.

Level
beginner
Time
~6 min
Task
Build the query
Access
Free — no account needed
Loading the practice workspace…

About this exercise

What you'll practise

Choose types deliberately: identifiers are text even when they look like numbers.

Northwind Kites sells kites and accessories through three regional stores. Orders are exported from the till system every week.

Steps

  1. Use the first row as headers.
  2. Keep OrderID as text so values like 0007 keep their zeros.
  3. Set Qty to a whole number and UnitPrice to a decimal number (en-US).
  4. Keep only OrderID, Qty and UnitPrice.

Your result must

  • OrderID values keep their leading zeros
  • Qty and UnitPrice are numbers
  • Three columns in this order

Input

  • OrderFile (file)
    • Text file; first line: OrderID,Customer,Qty,UnitPrice
    • Every field is text until you set types

Expected output columns

OrderID (text), Qty (number), UnitPrice (number)

First 3 of 12 expected rows
OrderIDQtyUnitPrice
0001347.9
0002215.32
000347.56