Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Bobi
Partner - Contributor II
Partner - Contributor II

Weighted average (with average-values*Respondents)

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 /

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 
did you try sum([Service Level]*respondents)/sum(respondents)

View solution in original post

1 Reply
lironbaram
Partner - Master III
Partner - Master III

hi 
did you try sum([Service Level]*respondents)/sum(respondents)