PL-300 · Question #168
You are designing a Power BI model that uses DirectQuery to connect to an Azure SQL database named sql1. The model will include two tables named Sales and Date. You need to limit the sales data to…
The correct answer is D. From Power Query Editor, use relative date filtering. To efficiently limit sales data to the last rolling year in a DirectQuery model and minimize execution times, apply relative date filtering directly within the Power Query Editor.
Question
You are designing a Power BI model that uses DirectQuery to connect to an Azure SQL database named sql1. The model will include two tables named Sales and Date. You need to limit the sales data to the last rolling year. The solution must minimize execution times for queries performed against sql1. What should you do?
Options
- AFrom Power Query Editor, add a Relative Year column to the Date table by using a DAX function.
- BCreate a calculated column in the Sales table.
- CAdd a Relative Year column to the Date table.
- DFrom Power Query Editor, use relative date filtering.
How the community answered
(33 responses)- A12% (4)
- B3% (1)
- C3% (1)
- D82% (27)
Why each option
To efficiently limit sales data to the last rolling year in a DirectQuery model and minimize execution times, apply relative date filtering directly within the Power Query Editor.
Adding a Relative Year column using DAX operates after data is queried and loaded into the Power BI model, meaning all data for the year would still be transferred from the source, which does not minimize execution times for the database.
Using relative date filtering in Power Query Editor leverages query folding, pushing the filtering logic directly to the Azure SQL database. This allows the database to perform the filtering natively and efficiently, minimizing data transferred and optimizing query execution times in DirectQuery mode.
Concept tested: DirectQuery optimization with query folding for filtering
Source: https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-query-folding
Topics
Community Discussion
No community discussion yet for this question.