Question 45 of 966
Model the datahardMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to modify the script to use a native SQL query that performs the filtering and aggregation on the server side. This approach, known as Power Query performance optimization pushdown to SQL, forces the database engine to handle the heavy lifting—filtering for 2022 orders, grouping by ProductID, summing revenue, and sorting for the top 10—before any data reaches Power BI. By reducing the volume of data transferred and leveraging SQL Server’s optimized execution, you minimize memory and processing overhead in Power Query, directly addressing the slow load time. On the PL-300 exam, this scenario tests your understanding of query folding and data source optimization; a common trap is assuming that all Power Query steps automatically fold, when in reality operations like sorting and taking the top N often break folding unless wrapped in a native query. Remember the memory tip: “Fold or fail—push the work to the server’s rail.”

PL-300 Model the data Practice Question

This PL-300 practice question tests your understanding of model the data. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

```
let
    Source = Sql.Database("server1", "AdventureWorks"),
    SalesTable = Source{[Schema="dbo",Item="Sales"]}[Data],
    FilteredRows = Table.SelectRows(SalesTable, each [OrderDate] >= #date(2022,1,1) and [OrderDate] <= #date(2022,12,31)),
    GroupedRows = Table.Group(FilteredRows, {"ProductID"}, {{"TotalRevenue", each List.Sum([Revenue]), type number}}),
    SortedRows = Table.Sort(GroupedRows,{{"TotalRevenue", Order.Descending}}),
    Top10 = Table.FirstN(SortedRows,10)
in
    Top10

You are reviewing a Power Query M script used to create a table in Power BI. The script imports data from SQL Server, filters for orders in 2022, groups by ProductID to sum revenue, sorts descending, and takes the top 10. However, the table loads slowly. You need to improve performance. Which change should you make?

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
let
    Source = Sql.Database("server1", "AdventureWorks"),
    SalesTable = Source{[Schema="dbo",Item="Sales"]}[Data],
    FilteredRows = Table.SelectRows(SalesTable, each [OrderDate] >= #date(2022,1,1) and [OrderDate] <= #date(2022,12,31)),
    GroupedRows = Table.Group(FilteredRows, {"ProductID"}, {{"TotalRevenue", each List.Sum([Revenue]), type number}}),
    SortedRows = Table.Sort(GroupedRows,{{"TotalRevenue", Order.Descending}}),
    Top10 = Table.FirstN(SortedRows,10)
in
    Top10

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

Modify the script to use a native SQL query that performs the filtering and aggregation on the server side.

Option C is correct because pushing filtering, grouping, and aggregation to SQL Server via a native query reduces the volume of data transferred to Power BI and leverages the database engine's optimized execution. This minimizes memory and processing overhead in Power Query, directly addressing the slow load time caused by performing these operations on imported data.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Add a Table.Buffer step before the filter to speed up subsequent operations.

    Why it's wrong here

    Buffering early can cause memory issues and does not reduce data volume.

  • Remove the sorting step because it is unnecessary for the final table.

    Why it's wrong here

    Sorting is not the main performance issue; the grouping of a large dataset is.

  • Modify the script to use a native SQL query that performs the filtering and aggregation on the server side.

    Why this is correct

    This enables query folding and reduces data transfer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Combine the filter, group, and sort into a single step using Table.Buffer.

    Why it's wrong here

    Buffering does not improve performance; it may break query folding.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume buffering (Table.Buffer) or combining steps improves performance, when in reality the key performance gain comes from pushing transformations to the source database (query folding) to minimize data movement.

Detailed technical explanation

How to think about this question

When Power Query imports data without query folding, it retrieves all rows from SQL Server and then applies filters, groups, and sorts in its own engine (the Mashup Engine). By using a native SQL query with WHERE, GROUP BY, and ORDER BY, you enable full query folding, allowing SQL Server to use indexes and parallel execution to return only the aggregated top-10 result set. This drastically reduces network I/O and Power Query's memory footprint, which is critical for large fact tables.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PL-300 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PL-300 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PL-300 question test?

Model the data — This question tests Model the data — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Modify the script to use a native SQL query that performs the filtering and aggregation on the server side. — Option C is correct because pushing filtering, grouping, and aggregation to SQL Server via a native query reduces the volume of data transferred to Power BI and leverages the database engine's optimized execution. This minimizes memory and processing overhead in Power Query, directly addressing the slow load time caused by performing these operations on imported data.

What should I do if I get this PL-300 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.