The request

From Mei Morgan, Buyer
Your goal
The Source step holds marketplace_june_kitchen.csv as imported. Add three steps: remove the customer_code column, keep only the rows whose status is not cancelled, and change unit_price to a decimal number.
- Show exactly
order_idorder_datestatusproductquantityunit_pricenot done yet - 27 rowsnot done yet
Your sheet
| order_id | order_date | status | customer_code | product | quantity | unit_price | |
|---|---|---|---|---|---|---|---|
| 1 | 9756 | 2025-06-01 | completed | C00487 | Thatcher Cast Iron Bowl Set | 1 | 16.99 |
| 2 | 9763 | 2025-06-01 | completed | C01459 | Linden Enamel Serving Platter | 1 | 19.99 |
| 3 | 9766 | 2025-06-02 | completed | C01446 | Cove Cast Iron Dutch Oven | 16 | 10.99 |
| 4 | 9766 | 2025-06-02 | completed | C01446 | Willow Acacia Knife Block | 4 | 53.99 |
| 5 | 9768 | 2025-06-02 | completed | C00185 | Oakley Enamel Dutch Oven | 1 | 109.00 |
| 6 | 9784 | 2025-06-04 | completed | C00173 | Hazel Porcelain Serving Platter | 1 | 179.00 |
| 7 | 9784 | 2025-06-04 | completed | C00173 | Tidewater Stainless Wine Glasses | 1 | 169.00 |
| 8 | 9789 | 2025-06-04 | completed | C00995 | Vale Enamel Bowl Set | 3 | 11.99 |
| 9 | 9790 | 2025-06-04 | completed | C01089 | Alder Acacia Dutch Oven | 1 | 72.99 |
| 10 | 9807 | 2025-06-06 | cancelled | C01267 | Monroe Stoneware Utensil Set | 8 | 13.99 |
| 11 | 9821 | 2025-06-07 | completed | C01005 | Glen Stoneware Carafe | 2 | 60.99 |
| 12 | 9843 | 2025-06-09 | completed | C00636 | Cove Cast Iron Dutch Oven | 4 | 10.99 |
| 13 | 9843 | 2025-06-09 | completed | C00636 | Willow Acacia Knife Block | 8 | 53.99 |
| 14 | 9845 | 2025-06-10 | completed | C01099 | Thatcher Cast Iron Bowl Set | 2 | 16.99 |
| 15 | 9852 | 2025-06-10 | completed | C01010 | Hazel Stainless Dutch Oven | 1 | 109.00 |
| 16 | 9867 | 2025-06-12 | completed | C00029 | Linden Enamel Serving Platter | 1 | 19.99 |
| 17 | 9867 | 2025-06-12 | completed | C00029 | Glen Stoneware Carafe | 1 | 60.99 |
| 18 | 9867 | 2025-06-12 | completed | C00029 | Thatcher Acacia Dutch Oven | 1 | 13.99 |
| 19 | 9886 | 2025-06-14 | completed | C00383 | Monroe Stoneware Utensil Set | 1 | 13.99 |
| 20 | 9888 | 2025-06-14 | cancelled | C00878 | Cove Cast Iron Dutch Oven | 4 | 10.99 |
| 21 | 9888 | 2025-06-14 | cancelled | C00878 | Willow Acacia Knife Block | 1 | 53.99 |
| 22 | 9899 | 2025-06-15 | completed | C00225 | Hazel Porcelain Serving Platter | 2 | 179.00 |
| 23 | 9909 | 2025-06-15 | cancelled | C01359 | Thatcher Cast Iron Bowl Set | 1 | 16.99 |
| 24 | 9932 | 2025-06-17 | completed | C01487 | Vale Enamel Bowl Set | 2 | 11.99 |
| 25 | 10023 | 2025-06-26 | completed | C01427 | Cove Cast Iron Dutch Oven | 1 | 10.99 |
| 26 | 10036 | 2025-06-26 | completed | C00963 | Willow Acacia Knife Block | 1 | 53.99 |
| 27 | 10040 | 2025-06-27 | cancelled | C01278 | Thatcher Cast Iron Bowl Set | 2 | 16.99 |
| 28 | 10047 | 2025-06-27 | completed | C01109 | Cove Cast Iron Dutch Oven | 1 | 10.99 |
| 29 | 10059 | 2025-06-28 | completed | C01502 | Vale Enamel Bowl Set | 1 | 11.99 |
| 30 | 10059 | 2025-06-28 | completed | C01502 | Glen Stoneware Carafe | 2 | 60.99 |
| 31 | 10072 | 2025-06-29 | completed | C00003 | Hazel Porcelain Serving Platter | 2 | 179.00 |
| 32 | 10093 | 2025-06-30 | completed | C00205 | Upland Acacia Serving Platter | 2 | 38.99 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each row of the result that matches becomes a firefly in your lantern.
What Mei gets, and why
The lesson
Every analyst has a file that arrives each month and needs the same clean-up each time. In Excel, Power Query is the tool for that: you connect to the file, and every change you make is recorded as a step. Next month, the steps replay on the new file by themselves.
What you are working in
This page is a practice editor for Power Query’s way of working, not Power Query itself. The table at the top is the Source step: the CSV as it was imported. You add steps in the box, one per line, and the editor shows the table after each step, like the Applied Steps pane in Excel. The step names and results match Power Query’s, so what you practise here is what you click at your desk.
In real Excel the same import goes like this:
- Data → Get Data → From File → From Text/CSV (or Data → From Text/CSV), pick
marketplace_june_kitchen.csv. - A preview opens. Excel guesses the delimiter (comma, semicolon, tab) and the column types. Click Transform Data instead of Load, so the Power Query Editor opens.
- The Applied Steps pane on the right already shows
Source,Promoted Headers(the first row became the column names) and usuallyChanged Type(Excel’s guess at the types).
The original CSV is never touched. Power Query reads it and builds a cleaned copy; that is why you can always undo a step by deleting it from the list.
Three steps on this file
The source has 32 rows: order lines for Kitchen products sold on the marketplace in June 2025.
| Step | What it does here | In Excel |
|---|---|---|
Remove columns: customer_code |
drops the column the buyer doesn’t need | right-click the header → Remove |
Filter rows: status <> cancelled |
keeps 27 rows; the 5 lines of 4 cancelled orders go | arrow on the status header → untick cancelled |
Change type: unit_price to decimal |
"16.99" (text) becomes 16.99 (a number) |
click the ABC icon on the header → Decimal Number |
After the filter, status only holds completed. Order 9888 is a good one to watch: it had two
lines and both disappear, because the filter tests each row on its own.
Why the price needs a type
unit_price came in as text. You can see it in the source: the marketplace writes 109.00, with
the trailing zeros a number would drop. In Excel’s editor the column header shows ABC for text,
1.2 for a decimal and 123 for a whole number.
Excel’s automatic Changed Type step is a guess based on the first rows, and exports with quoted
or oddly formatted numbers often come in as text. Text looks like a number until you try to add
it up: SUM skips it, and a multiplication in a custom column fails. Set the type yourself on
every column you will calculate with. Here quantity is already a whole number, so only the price
needs the step.
The M behind the steps
Each click writes one line of M, Power Query’s formula language. You never have to type it, but it is good to recognise it in View → Advanced Editor:
#"Removed Columns" = Table.RemoveColumns(#"Promoted Headers", {"customer_code"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns", each ([status] <> "cancelled")),
#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows", {{"unit_price", type number}})
Each step names the step before it. That chain is the Applied Steps list.
Load and refresh
When the table looks right, Home → Close & Load puts it on a new sheet as an Excel Table.
Next month, save the July file over the June one (same name, same folder) and press
Data → Refresh All: the three steps run again on the new rows. If the file moves, edit the
Source step (the gear icon next to it) and point it at the new path.
Common mistakes
- Writing the value in a different case. Power Query compares text exactly:
status <> Cancelledkeeps every row, because no row saysCancelledwith a capital C. - Skipping Change type. The prices look like numbers but stay text, and every total built on them breaks.
- Removing a column a later step needs. Steps run in order. If a filter on
customer_codecame afterRemove columns: customer_code, it would fail with “There is no column”. - Clicking Load instead of Transform Data. The raw file lands on a sheet as-is. Open the query again with Data → Queries & Connections and double-click it.
Lantern lit!
Practised: power queryapplied stepsimport csvfilter rowschange type
- Solved
- No hints
- First run
