Power QueryExercises

Fix a query that removes a column before using it (kite shop)

The query trims columns too early, so the Revenue step can't find UnitPrice. Reorder the steps.

Level
intermediate
Time
~7 min
Task
Fix a broken query
Access
Free — no account needed
Loading the practice workspace…

About this exercise

What you'll practise

Read an Expression.Error about a missing column and fix the step order that caused it.

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

Steps

  1. The starter query fails with an error that the field UnitPrice wasn't found.
  2. The result should have exactly OrderID, Customer and Revenue (= Qty × UnitPrice) for every order.
  3. Calculate Revenue before the step that keeps only the output columns.

Your result must

  • The query runs without errors
  • Columns: OrderID, Customer, Revenue
  • Revenue = Qty × UnitPrice

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), Revenue (number)

First 3 of 12 expected rows
OrderIDCustomerRevenue
0001Dmitri Kowal55.63
0002Nia Petrov117.9
0003Idris Grieve24.65