Power QueryExercises

Summarise each order's lines without flattening them (webshop)

For every JSON order, count its lines and total its units directly from the nested list, keeping one row per order.

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

About this exercise

What you'll practise

Aggregate nested lists of records in place instead of expanding to rows.

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

  • OrdersJson (file)
    • JSON document (parse with Json.Document)

Expected output columns

id (text), Lines (number), Units (number)