1. Lighthouse

Level 1 · Import only what the report needs

The request

From Kevin Walsh, Head of Customer Service

“I'm building a small report on our app orders from the first days of December. The orders table in the warehouse has everything, coupons and fees included. I only need the order, the customer, the date and the channel, and only orders that actually went through.”

Your goal

The Source step is the orders table for 1–2 December 2025 as imported from SQL Server. Keep only order_id, customer_id, order_date and status, in that order, and keep only the rows whose status is completed.

  • Show exactly order_id customer_id order_date statusnot done yet
  • 45 rowsnot done yet

Your query steps

Power Query
The sheet for this level
order_idcustomer_idorder_datestatuschannelshipping_feecoupon_code
11222418462025-12-01completedapp6.95
21222513192025-12-01completedapp0BFCM25
3122265222025-12-01completedapp0
4122273842025-12-01completedapp0BFCM25
5122293282025-12-01completedapp0
61223210322025-12-01completedapp0BFCM25
71223418442025-12-01completedapp0BFCM25
8122363712025-12-01completedapp6.95BFCM25
91223713192025-12-01completedapp0BFCM25
101224218592025-12-01completedapp0
111224311262025-12-01completedapp0BFCM25
121224618162025-12-01refundedapp0BFCM25
131224818462025-12-01completedapp0
14122509252025-12-01cancelledapp0
15122525242025-12-01completedapp6.95
161225518132025-12-01completedapp0BFCM25
171225612132025-12-01completedapp0
181225815312025-12-01completedapp0BFCM25
191226014612025-12-01completedapp0BFCM25
20122615582025-12-01cancelledapp0BFCM25
21122622292025-12-01completedapp0BFCM25
221226510432025-12-01completedapp0BFCM25
231226615362025-12-01completedapp14.95BFCM25
241226815562025-12-01completedapp0BFCM25
251226918712025-12-01completedapp0
261227011572025-12-01completedapp0
271227114682025-12-01cancelledapp6.95
28122739622025-12-01completedapp0BFCM25
291227710332025-12-01completedapp0
301227814382025-12-01completedapp0
31122818942025-12-01completedapp0BFCM25
32122828462025-12-01completedapp0
33122844692025-12-01completedapp49
34122867972025-12-01completedapp14.95
35122879042025-12-01completedapp6.95
361229014042025-12-01completedapp0
37122938932025-12-02completedapp0HOLIDAY20
381229518352025-12-02completedapp0
39122974762025-12-02completedapp0HOLIDAY20
40122998632025-12-02completedapp0
411230218472025-12-02completedapp6.95
4212303642025-12-02completedapp6.95
431230411562025-12-02completedapp6.95
4412307292025-12-02completedapp6.95
45123085192025-12-02cancelledapp0
46123093812025-12-02completedapp49HOLIDAY20
47123112512025-12-02completedapp6.95
481231218282025-12-02completedapp0
491231315262025-12-02completedapp0
501231417632025-12-02completedapp0

Loading the editor…

    ResultPress Check to compare the query result

    Mote checks your result

    Press Check. Mote fills in your answer and compares it with what the report needs.

    The lesson

    The first rule of building a report: bring in only what it needs. Every extra column makes the model bigger and slower, and every cancelled order is one more row someone has to remember to filter out.

    Getting the data in Power BI Desktop

    For a SQL Server table: Home → Get data → SQL Server, type the server and database, choose Import, then in the Navigator tick the orders table and press Transform Data (not Load). That opens the Power Query Editor with the table as its first step, called Source. For an Excel workbook it is Get data → Excel workbook, then the sheet or table in the Navigator; for a CSV, Get data → Text/CSV. Transform Data is the habit to build: you look at the data before it reaches the model.

    What you are working in

    This page is a practice editor for Power Query’s way of working, not Power Query itself. The Source step holds the imported table; you add steps one per line, and the preview shows the table after each one. The step names and results match Power Query’s.

    Keep columns by name

    Choose columns: order_id, customer_id, order_date, status

    In Power BI: Home → Choose Columns, tick the four columns. Power Query records a step called Removed Other Columns. The M it writes:

    Table.SelectColumns(Source, {"order_id", "customer_id", "order_date", "status"})

    Choosing by name is safer than removing by name: when the source gains a column next month, your report doesn’t change.

    Keep rows by a test

    Filter rows: status = completed

    In Power BI: click the arrow on the status header and untick everything except completed, or use Text Filters → Equals. The step is Filtered Rows:

    Table.SelectRows(#"Removed Other Columns", each [status] = "completed")

    Filter early, at the source

    When the source is a database, Power Query can often send these first steps back to SQL Server as a query (it is called query folding), so only the rows and columns you keep travel over the network. Steps that can’t fold, like many custom columns, should come after the ones that can.

    Common mistakes

    • Loading straight from the Navigator. You skip the look at the data and the clean-up.
    • Text case. Power Query compares text case-sensitively: Completed is not completed.
    • Filtering in the visual instead. A visual filter hides rows; the model still carries them.

    Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.