The request

From Laura Bennett, Head of Finance
Your goal
Step 1 of 3. Append Marketplace_Wk45 under this week's rows, then remove duplicate order lines by order_item_id, so November 2 is counted once.
- Show exactly
order_item_idorder_datecategoryquantityamountnot done yet - 80 rowsnot done yet
Step 2 of 3. Change order_item_id and quantity to whole numbers, amount to a decimal number and order_date to a date. Then trim category and capitalize each word, so every category is written one way.
- Show exactly
order_item_idorder_datecategoryquantityamountnot done yet - 80 rowsnot done yet
Step 3 of 3. Group by category with revenue = the sum of amount and units = the sum of quantity, and sort by revenue, biggest first.
- Show exactly
categoryrevenueunitsnot done yet - 6 rows, sorted as askednot done yet
Step 1 · your query steps
| order_item_id | order_date | category | quantity | amount | |
|---|---|---|---|---|---|
| 1 | 26490 | 2025-10-28 | DECOR | 4 | 175.96 |
| 2 | 26491 | 2025-10-28 | Decor | 2 | 39.98 |
| 3 | 26492 | 2025-10-28 | lighting | 2 | 378.00 |
| 4 | 26505 | 2025-10-28 | Kitchen | 1 | 53.99 |
| 5 | 26506 | 2025-10-28 | KITCHEN | 1 | 70.99 |
| 6 | 26529 | 2025-10-29 | Lighting | 2 | 698.00 |
| 7 | 26549 | 2025-10-30 | Outdoor | 1 | 50.99 |
| 8 | 26550 | 2025-10-30 | DECOR | 1 | 17.99 |
| 9 | 26566 | 2025-10-30 | LIGHTING | 1 | 189.00 |
| 10 | 26567 | 2025-10-30 | Decor | 1 | 17.99 |
| 11 | 26568 | 2025-10-30 | kitchen | 3 | 116.97 |
| 12 | 26591 | 2025-10-31 | Kitchen | 1 | 9.89 |
| 13 | 26613 | 2025-11-01 | Furniture | 1 | 519.00 |
| 14 | 26614 | 2025-11-01 | DECOR | 1 | 179.00 |
| 15 | 26615 | 2025-11-01 | Decor | 4 | 71.96 |
| 16 | 26616 | 2025-11-01 | decor | 2 | 31.98 |
| 17 | 26617 | 2025-11-01 | Decor | 3 | 59.97 |
| 18 | 26618 | 2025-11-01 | LIGHTING | 9 | 1791.00 |
| 19 | 26619 | 2025-11-01 | Textiles | 6 | 509.94 |
| 20 | 26620 | 2025-11-01 | textiles | 2 | 55.98 |
| 21 | 26625 | 2025-11-01 | Decor | 3 | 134.97 |
| 22 | 26659 | 2025-11-02 | Furniture | 2 | 358.00 |
| 23 | 26670 | 2025-11-02 | DECOR | 3 | 47.97 |
| 24 | 26671 | 2025-11-02 | Kitchen | 1 | 13.99 |
| 25 | 26672 | 2025-11-02 | kitchen | 4 | 43.96 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Mote fills in your answer and compares it with what the report needs.
Step 2 · your query steps
| order_item_id | order_date | category | quantity | amount | |
|---|---|---|---|---|---|
| 1 | 26490 | 2025-10-28 | DECOR | 4 | 175.96 |
| 2 | 26491 | 2025-10-28 | Decor | 2 | 39.98 |
| 3 | 26492 | 2025-10-28 | lighting | 2 | 378.00 |
| 4 | 26505 | 2025-10-28 | Kitchen | 1 | 53.99 |
| 5 | 26506 | 2025-10-28 | KITCHEN | 1 | 70.99 |
| 6 | 26529 | 2025-10-29 | Lighting | 2 | 698.00 |
| 7 | 26549 | 2025-10-30 | Outdoor | 1 | 50.99 |
| 8 | 26550 | 2025-10-30 | DECOR | 1 | 17.99 |
| 9 | 26566 | 2025-10-30 | LIGHTING | 1 | 189.00 |
| 10 | 26567 | 2025-10-30 | Decor | 1 | 17.99 |
| 11 | 26568 | 2025-10-30 | kitchen | 3 | 116.97 |
| 12 | 26591 | 2025-10-31 | Kitchen | 1 | 9.89 |
| 13 | 26613 | 2025-11-01 | Furniture | 1 | 519.00 |
| 14 | 26614 | 2025-11-01 | DECOR | 1 | 179.00 |
| 15 | 26615 | 2025-11-01 | Decor | 4 | 71.96 |
| 16 | 26616 | 2025-11-01 | decor | 2 | 31.98 |
| 17 | 26617 | 2025-11-01 | Decor | 3 | 59.97 |
| 18 | 26618 | 2025-11-01 | LIGHTING | 9 | 1791.00 |
| 19 | 26619 | 2025-11-01 | Textiles | 6 | 509.94 |
| 20 | 26620 | 2025-11-01 | textiles | 2 | 55.98 |
| 21 | 26625 | 2025-11-01 | Decor | 3 | 134.97 |
| 22 | 26659 | 2025-11-02 | Furniture | 2 | 358.00 |
| 23 | 26670 | 2025-11-02 | DECOR | 3 | 47.97 |
| 24 | 26671 | 2025-11-02 | Kitchen | 1 | 13.99 |
| 25 | 26672 | 2025-11-02 | kitchen | 4 | 43.96 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Mote fills in your answer and compares it with what the report needs.
Step 3 · your query steps
| order_item_id | order_date | category | quantity | amount | |
|---|---|---|---|---|---|
| 1 | 26490 | 2025-10-28 | DECOR | 4 | 175.96 |
| 2 | 26491 | 2025-10-28 | Decor | 2 | 39.98 |
| 3 | 26492 | 2025-10-28 | lighting | 2 | 378.00 |
| 4 | 26505 | 2025-10-28 | Kitchen | 1 | 53.99 |
| 5 | 26506 | 2025-10-28 | KITCHEN | 1 | 70.99 |
| 6 | 26529 | 2025-10-29 | Lighting | 2 | 698.00 |
| 7 | 26549 | 2025-10-30 | Outdoor | 1 | 50.99 |
| 8 | 26550 | 2025-10-30 | DECOR | 1 | 17.99 |
| 9 | 26566 | 2025-10-30 | LIGHTING | 1 | 189.00 |
| 10 | 26567 | 2025-10-30 | Decor | 1 | 17.99 |
| 11 | 26568 | 2025-10-30 | kitchen | 3 | 116.97 |
| 12 | 26591 | 2025-10-31 | Kitchen | 1 | 9.89 |
| 13 | 26613 | 2025-11-01 | Furniture | 1 | 519.00 |
| 14 | 26614 | 2025-11-01 | DECOR | 1 | 179.00 |
| 15 | 26615 | 2025-11-01 | Decor | 4 | 71.96 |
| 16 | 26616 | 2025-11-01 | decor | 2 | 31.98 |
| 17 | 26617 | 2025-11-01 | Decor | 3 | 59.97 |
| 18 | 26618 | 2025-11-01 | LIGHTING | 9 | 1791.00 |
| 19 | 26619 | 2025-11-01 | Textiles | 6 | 509.94 |
| 20 | 26620 | 2025-11-01 | textiles | 2 | 55.98 |
| 21 | 26625 | 2025-11-01 | Decor | 3 | 134.97 |
| 22 | 26659 | 2025-11-02 | Furniture | 2 | 358.00 |
| 23 | 26670 | 2025-11-02 | DECOR | 3 | 47.97 |
| 24 | 26671 | 2025-11-02 | Kitchen | 1 | 13.99 |
| 25 | 26672 | 2025-11-02 | kitchen | 4 | 43.96 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Mote fills in your answer and compares it with what the report needs.
What Laura gets, and why
The lesson
This boss level is the whole chapter in one query: two raw files in, one clean table out, every step recorded so the next file costs one click. As in the rest of the chapter, you work in the practice editor, not Power Query itself; each step’s starter carries the steps you’ve already written, the way Applied Steps grow in Power BI.
The files
Both exports have the same five columns: order_item_id, order_date, category, quantity
and amount, all text. Marketplace_Wk44 (the Source) covers October 27 to November 2, 25
lines; Marketplace_Wk45 covers November 2 to 9, 59 lines. The category is typed four ways:
Lighting, lighting, LIGHTING and Lighting with a trailing space.
Step 1: one table, each line once
Append queries: Marketplace_Wk45
Remove duplicates: order_item_id
In Power BI: select the first query, Home → Append Queries (or Append Queries as New to leave both untouched), pick the second. Append matches columns by name; a column only one file has is filled with null in the other’s rows. For a folder of weekly files, Get data → Folder followed by Combine & Transform does the appending for you on every refresh.
Then select order_item_id and Home → Remove Rows → Remove Duplicates. Power Query keeps
the first row of each order_item_id. Choosing the key column matters: removing duplicates
across all columns would keep both copies of a line the marketplace had corrected between files.
Step 2: types and text
Change type: order_item_id, quantity to whole number
Change type: amount to decimal
Change type: order_date to date
Trim: category
Capitalize each word: category
In Power BI, select columns and use Transform → Data Type, then Transform → Format →
Trim and Capitalize Each Word. Look at View → Column quality after the type changes:
0% errors in every column means every value converted. If amount had used a comma as decimal
separator, you’d change it Using Locale instead of replacing characters by hand.
Step 3: the summary
Group by: category | revenue = sum of amount | units = sum of quantity
Sort rows: revenue descending
Home → Group By → Advanced, two aggregations (Sum of amount, Sum of quantity), then sort
revenue descending.
Load it
Home → Close & Apply runs the query and loads the result into the model; from then on, Home → Refresh in Report view replays every step on the current files. Right-click the two weekly queries → untick Enable load, so only the clean table reaches the model and the raw files stay as inputs.
What it shows
Lighting leads the fortnight with $5,148 from 32 units, almost twice Furniture’s $2,732, which took only 8 units: marketplace furniture orders are rare but large. Decor sold the most units, 49, for $1,541. Revenue and units tell different stories, so Laura gets both side by side.
Common mistakes
- Appending after cleaning only the first file: the second file’s text never gets fixed. Append first, clean once.
- Removing duplicates before appending: each file has no duplicates on its own; the overlap only appears once they’re stacked.
- Grouping on the raw category:
lightingandLIGHTINGstay separate rows.
Lantern lit!
Practised: power queryappend queriesremove duplicateschange typetrimcapitalize each wordgroup byclose and apply
- Solved
- No hints
- First run
