Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I want to calculate the weighted average in a table that has 3 columns. (like this)
Yearweek, Market, Average(Service Level), number of Respondents
202101, Germany, 0.5, 400
202101, France, 0.4, 300
202102, Germany, 0.3, 700
and so on.
I tried like this:
Sum((aggr(sum(respondents),YearWeek,Market)*aggr(sum(Service Level),YearWeek,Market)))/
Sum(respondents)
The idea is simply to get the average value of service level but it should take into acount the nr of respondents.
Best regards /
hi
did you try sum([Service Level]*respondents)/sum(respondents)
hi
did you try sum([Service Level]*respondents)/sum(respondents)