Courseiva
Prepare the data →mediumMultiple Choice

PL-300 Prepare the data Practice Question

Exhibit

Refer to the exhibit.

let
    Source = Sql.Database("myserver.database.windows.net", "SalesDB"),
    SalesTable = Source{[Schema="dbo",Item="Sales"]}[Data],
    FilteredRows = Table.SelectRows(SalesTable, each [OrderDate] >= #date(2023,1,1)),
    RemovedColumns = Table.RemoveColumns(FilteredRows,{"Discount"}),
    GroupedRows = Table.Group(RemovedColumns, {"CustomerID"}, {{"Total", each List.Sum([Amount]), type number}})
in
    GroupedRows

You are reviewing a Power Query M expression in the advanced editor. The exhibit shows the query. What is the final output of this query?

⚠ Common exam trap

The trap here is that candidates often overlook the filter step and assume the query returns all records or all customers, failing to recognize that the date filter and grouping fundamentally change both the row set and the structure of the output.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

A table with total sales amount per customer for orders after 2023

The query filters the Sales table to keep only rows where the OrderDate is in 2024 or later (i.e., after 2023), then groups by CustomerID, summing the SalesAmount for each customer. The final output is a table with one row per customer showing their total sales amount for orders placed after 2023.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    A table with total sales amount per customer for all orders

    Why it's wrong here

    This option falsely assumes the OrderDate filter has no effect on the grouped totals. The M expression first applies a Table.SelectRows filter requiring OrderDate >= 2023-01-01, so only orders on or after that date enter the subsequent grouping. Consequently, the Sum of Amount is computed exclusively over the 2023+ subset, leaving pre-2023 orders absent from the CustomerID totals. Thus the output is not a total for all orders but for a filtered subset.

  • ✓

    A table with total sales amount per customer for orders after 2023

    Why this is correct

    This exactly matches the M expression's step sequence: a row filter on OrderDate >= 2023-01-01, a Table.SelectColumns step that removes extraneous fields (e.g., Discount, ProductID), and a Table.Group operation keyed by CustomerID that aggregates Amount with List.Sum into a new total column. The resulting table has one row per distinct CustomerID, and each value of the aggregated column represents the sum of Amount for orders placed in 2023 or later. This is the correct interpretation of the transformation chain.

  • ✗

    A table with all sales records after 2023

    Why it's wrong here

    The grouping step fundamentally changes the row granularity: Table.Group collapses many order rows into a single row per CustomerID, so the output no longer contains one row per individual sale. While the first two steps (filter then remove columns) do preserve individual records, the final grouping aggregates the Amount column, destroying the original transaction-level structure. Therefore the output cannot be described as 'all sales records after 2023' because records are no longer retained as separate rows.

  • ✗

    A table with all sales records after 2023, excluding Discount column

    Why it's wrong here

    This option confuses column removal with row aggregation. The 'exclude Discount' step is a Table.SelectColumns operation that drops the Discount field before grouping, but the later Table.Group by CustomerID also reduces every customer's multiple order rows into a single aggregated row, summing only the Amount column. Even though Discount is removed, the resulting table is an aggregative summary, not a row-level sales table; other non-aggregated columns would likewise need to be either removed or aggregated, so it is not merely 'all sales records minus one column.'

About these practice questions

One of 524 original PL-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.