Forum Discussion
Slow Measures
I have created 3 simple measures:
6 Replies
- aj1973Community Champion
- aross0602Frequent Visitor
Yes, these are the results:
- AnonymousNot applicable
Hi aross0602 ,
Everytime the measure is called in an expression, the filter and/or context may be different. That is why it needs to be evaluated separately each time.
Paste the other measures that are referenced in the final measure, we may be able to optimize those as well.
try this:
Retail Transactions = var Transactions = DISTINCTCOUNT('Transactions'[RevenueExtended]) return calculate(Transactions,Filter('Transactions',[SalesChannel]="IN-STORE"))Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- aross0602Frequent Visitor
Hi,
Did you intend to use RevenueExtended instead of OrderId in the var expression?
- AnonymousNot applicable
Hi aross0602 ,
My suggestion is just to try not to load measures inside calculate function, since the filter and/or context may be different each time the metric is called in the expression
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.