Forum Discussion
ZuzanaK
3 years agoFrequent Visitor
weighted average
Hello, I am struggling to create weighted average as this case is sort of unusual. Essentially, most of the campaigns have multiple strategies where I want to create uplift weighted average acros...
lbendlin
Super User
3 years agoWeighted uplift =
var a = SUMMARIZE(Campaigns,Campaigns[Campaign Id],"bd",sum(Campaigns[Budget]),"ul",sumx(Campaigns,Campaigns[Budget]*Campaigns[Booked Uplift]))
return sumx(a,[ul])/sumx(a,[bd])
(you should use DIVIDE() to safeguard against division by zero)
see attached.