Forum Discussion

NonoP's avatar
NonoP
New Member
1 year ago
Solved

Weighted average in DAX with wrong total

Hello,   I am doing a double weighted average: I have for every month, the associated number of days per month, one column category, the associated power of the category, the value I want to avera...
  • bhanu_gautam's avatar
    1 year ago

    NonoP , Try using 

     

    DAX
    Av_Tot_Plant_TEST =
    AVERAGEX (
    VALUES ( Plant[Month] ),
    CALCULATE (
    SUMX ( Plant, Plant[Availability] * Plant[Nb_jours] * Plant[Max_Power (MW)] )
    / SUMX ( Plant, Plant[Nb_jours] * Plant[Max_Power (MW)] )
    )
    )