
Answer-first summary for fast verification
Answer: No
The original query filters products where there is at least one related order item by checking if COUNTROWS('Order Item') is not blank. The proposed solution replaces this with ISEMPTY(RELATEDTABLE('Order Item')), which checks if the related table is empty (i.e., no order items). This reverses the logic: ISEMPTY returns TRUE when there are no order items, whereas the original condition is TRUE when there are order items. Therefore, the solution does not meet the goal as it changes the query's output. Community discussion strongly supports this, with 90% choosing 'No' and comments noting the logic reversal and suggesting NOT ISEMPTY would be correct instead.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a Fabric tenant containing a semantic model named Model1. You find that the following query executes slowly against Model1.
EVALUATE
SUMMARIZECOLUMNS (
'Product'[Product Name],
FILTER (
VALUES ( 'Product'[Product Name] ),
NOT ISBLANK (
CALCULATE (
COUNTROWS ( 'Order Item' )
)
)
)
)
EVALUATE
SUMMARIZECOLUMNS (
'Product'[Product Name],
FILTER (
VALUES ( 'Product'[Product Name] ),
NOT ISBLANK (
CALCULATE (
COUNTROWS ( 'Order Item' )
)
)
)
)
You need to reduce the query execution time.
Solution: Replace line 4 with the following code:
ISEMPTY ( RELATEDTABLE ( 'Order Item' ) )
Does this solution meet the goal?

A
Yes
B
No
No comments yet.