Forum Discussion

fullcount's avatar
fullcount
Frequent Visitor
4 years ago
Solved

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 ...
  • jdbuchanan71's avatar
    4 years ago

    fullcount 

    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