Keep only the columns a report needs (kite shop)
Choose OrderID, Customer and Qty so the report stays the same shape even when the export gains new columns.
- Level
- beginner
- Time
- ~5 min
- Task
- Build the query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Use Choose Columns (Table.SelectColumns) to keep a fixed set of columns that survives schema changes.
Northwind Kites sells kites and accessories through three regional stores. Orders are exported from the till system every week.
Steps
- Keep only
OrderID,CustomerandQty, in that order. - Use an approach that still works if the export adds new columns later.
Your result must
- Output columns: OrderID, Customer, Qty
- Every order row is kept
- A new column in next week's export doesn't appear in the output
Input
- Orders (table)
- OrderID: text
- Customer: text
- Region: text
- Product: text
- Qty: number
- UnitPrice: number
- OrderDate: text
- Status: text
Expected output columns
OrderID (text), Customer (text), Qty (number)
| OrderID | Customer | Qty |
|---|---|---|
| 0001 | Yara Tanaka | 8 |
| 0002 | Esi Eklund | 9 |
| 0003 | Hana Eklund | 9 |