Forum Discussion
fullcount
4 years agoFrequent Visitor
Optimizing an Average measure
Hello, I have created a measure that averages weekly item placements over the previous six weeks. (Because the same item may be placed in the same store each week, I need to capture this at the ...
- 4 years ago
Context transition might be jamming you up on the [Placements] measure. In my testing, this returns the same results and is almost 3x faster.
Placements = COUNTROWS( CALCULATETABLE( VALUES(Sales[Item Name + Store Name]), Sales[Units Sold] > 0 ) )This is your measure.
This is mine
fullcount
4 years agoFrequent Visitor
Hi all,
Thanks for the notes so far. [Placements] =
CALCULATE(SUMX(VALUES(Sales[Item Name + Store Name]),1),Sales[Units Sold]>0); a column version would be Placements = IF(Sales[Units Sold]>0,1,0)
Thanks!