Power QueryExercises

Accept both old and new names for a column (bakery)

Older exports call the column Quantity, newer ones Qty. Always end up with Qty, whichever arrives.

Level
intermediate
Time
~7 min
Task
Build the query
Access
Pro
Checking your access…

About this exercise

What you'll practise

Rename a column only when it exists, so two export versions feed one query.

The scenario, sample data, step list, hints and solution open with Pro. Grading checks your query against hidden data as well as the visible sample, so a query that only fits the sample doesn't pass.

Input

  • Orders (table)
    • OrderID: text
    • Customer: text
    • Region: text
    • Product: text
    • Quantity: number
    • UnitPrice: number
    • OrderDate: text
    • Status: text

Expected output columns

OrderID (text), Customer (text), Region (text), Product (text), Qty (number), UnitPrice (number), OrderDate (text), Status (text)