Power QueryExercises

Label orders with a price band from a band table (kite shop)

Bands are defined in a table (Band, Min, Max). Write a function that finds a value's band and use it on every order.

Level
advanced
Time
~11 min
Task
Build the query
Access
Pro
Checking your access…

About this exercise

What you'll practise

Write a function that queries another table, and call it from each.

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
    • Qty: number
    • UnitPrice: number
    • OrderDate: text
    • Status: text
  • Bands (table)
    • Band: text
    • Min: number
    • Max: number

Expected output columns

OrderID (text), UnitPrice (number), Band (text)