DP-600 · Question #95
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might h
The correct answer is B. No. The proposed replacement CALCULATE(COUNTROWS('Order Item')) >= 0 is a tautology - COUNTROWS always returns a non-negative integer (0 or greater), so this expression is ALWAYS TRUE for every row. This fundamentally breaks the filter logic of the original measure: instead of filter
Question
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have a Fabric tenant that contains a semantic model named Model1. You discover that the following query performs slowly against Model1. You need to reduce the execution time of the query. Solution: You replace line 4 by using the following code:
CALCULATE ( COUNTROWS ( 'Order Item' ) ) >= 0 Does this meet the goal?
Options
- AYes
- BNo
How the community answered
(16 responses)- A31% (5)
- B69% (11)
Explanation
The proposed replacement CALCULATE(COUNTROWS('Order Item')) >= 0 is a tautology - COUNTROWS always returns a non-negative integer (0 or greater), so this expression is ALWAYS TRUE for every row. This fundamentally breaks the filter logic of the original measure: instead of filtering rows based on whether related order items exist, every row passes the condition. The result is semantically incorrect data. Additionally, wrapping COUNTROWS in CALCULATE without specific filter arguments adds unnecessary overhead compared to simply using COUNTROWS directly in the right context. This solution neither preserves correctness nor improves performance.
Topics
Community Discussion
No community discussion yet for this question.