Forum Discussion
Anonymous
6 years agoNot applicable
weighted average
Hi community,
I need calculate a weighted average and i have this condition:
Weight:
Weight = SUMX('Table',
IF([category]="XPTO1" &&
MONTH('Table'[Date]) = MONTH(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date])) &&
YEAR'Table'[Date]) = YEAR(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date]))
,[total])
)
Value:
value= Weight = SUMX('Table',
IF([category]="XPTO2" &&
MONTH('Table'[Date]) = MONTH(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date])) &&
YEAR'Table'[Date]) = YEAR(IF(DISTINCTCOUNT('Table'[Date])>1, NOW(),[Date]))
,[total])
)
Can help me?
1 Reply
- amitchandakSuper User
Anonymous , Not very clear. Both formulae seems the same. You can make one of them as count and divide