Forum Discussion

Drors's avatar
Drors
Icon for Resolver III rankResolver III
8 years ago
Solved

Sum monthly Average - DAX HELP

Hi,   I have a table like : Date  CustomerID  TotalPrice   and I have create 3 measures : 1. Sum of total price 2. Count of distinct customer 3. avarege - measure 1 / measure 2   When I use...
  • Floriankx's avatar
    8 years ago

    Hello,

     

    you could try to SUMMARIZE and SUMX:

     

    YearAvg=
    SUMX(
     SUMMARIZE(Table,
    [YearColumn],
    [MonthColumn],
    "Sum of total price",SUM([Price],
    "CountOfCustomer",DISTINCTCOUNT([CustomerID])),
    [Sum of total price]/[CountOfCustomer])

    Best regards