Forum Discussion
NonoP
1 year agoNew Member
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...
- 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)] )
)
)
bhanu_gautam
Super User
1 year agoNonoP , 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)] )
)
)
NonoP
1 year agoNew Member
Thanks you!!