Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Need Assistance Optimizing DAX Statement

The below DAX statement is extremely slow (and sometimes exceeds resource limits), and I'm not sure how to optimize its speed. Does anyone have any tips on how this could be written more effeciently?

 

Total Customers by ATV Bin =
Var MinValue = MAX( 'ATV BinSelect'[MinValueRange] )
Var MaxValue = MAX( 'ATV BinSelect'[MaxValueRange] )

RETURN
CALCULATE(
[Transactions (Selected Product)],
FILTER(
VALUES( Sales[BasketID] ),
[ATV (Selected Product)] >= MinValue && [ATV (Selected Product)] < MaxValue ) )