PL-300 Prepare the data Practice Question
You are connecting to an Azure SQL Database from Power BI Desktop. The database contains a view that returns thousands of rows. You only need the last 100 rows for analysis. What is the most efficient way to reduce the data loaded?
⚠ Common exam trap
Watch out — candidates often think a native SQL query (Option A) is always the most efficient, but they overlook that Power Query's query folding can achieve the same result with better integration and maintainability, while a poorly written SQL query without proper sorting would not correctly retrieve the 'last' rows.
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
✓
Use the 'Keep Top Rows' transformation in Power Query after applying a sort
It uses Power Query's 'Keep Top Rows' transformation after sorting the view by the desired order (e.g., descending on a date column). This approach pushes the sort and row-limiting logic to the source database via query folding, ensuring only the last 100 rows are transferred over the network, which is the most efficient method for reducing data loaded.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Write a native SQL query with a WHERE clause to limit rows
Why it's wrong here
Writing a native SQL query with a WHERE clause can indeed restrict rows at the database, but it requires manual SQL authoring and maintenance outside of Power Query's declarative transformation pipeline. If you cannot modify the source object or you need a flexible, self-service solution, this approach reduces portability and bypasses Power Query's query folding awareness. It may also produce a separate query that is less transparent to other report creators.
- ✗
Use DirectQuery mode and add a filter in the report
Why it's wrong here
DirectQuery mode sends live queries to Azure SQL for every visual interaction, and adding a report-level filter does not create a materialized dataset—each query still evaluates the entire underlying view or table at the database side. This can lead to repeated full scans and cannot push down Power Query native operations like sorting and top-N selection. It also prevents the performance benefits of an in-memory import model, making it unsuitable for a one-time extraction of a small row set.
- ✗
Import all rows and then remove rows in Power Query
Why it's wrong here
Importing all rows into the VertiPaq engine before removing rows means the full table is transferred over the network and stored in memory, wasting I/O and RAM. Any subsequent row removal happens after the data has already been loaded, so you do not benefit from source-side query folding. This is especially wasteful for large Azure SQL tables where the desired result is only a few hundred rows, and it degrades overall refresh performance.
- ✓
Use the 'Keep Top Rows' transformation in Power Query after applying a sort
Why this is correct
Applying a sort step followed by Keep Top Rows in Power Query is the optimal approach because the M engine can fold these transformations into a single SELECT TOP (N) ORDER BY statement on Azure SQL. This ensures that only the top N rows are fetched from the database, drastically reducing data transfer and load time. Additionally, the transformation remains declarative and reusable, and it aligns with best practices for source-side filtering in Power BI.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PL-300 question from scratch — 217 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.