Forum Discussion

shaykoooo's avatar
shaykoooo
Helper I
8 years ago
Solved

Differenr results then expected

Hi, In sheet "???", I have two measres, Average Quantity Sold per Day = AVERAGEX(VALUES(Dates[Date]),[Total Quantity Sold]) and Average Quantity Sold per Day 2 = AVERAGEX(VALUES(Dates[Date]),SUM(Sal...
  • Zubair_Muhammad's avatar
    8 years ago

    shaykoooo

     

     

    You should wrap the sum inside calculate to transform the ROW context into FILTER CONTEXT

     

    Average Quantity Sold per Day 2 =
    AVERAGEX ( VALUES ( Dates[Date] ), CALCULATE ( SUM ( Sales[Quantity] ) ) )