Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have some score for each employee. Employee receives score from supervisors.
I want to receive such result (table or pivot table with 2 columns: employee and avg):
a: (4 + 15 + 2.5)/3 = 7.17
b: (21 + 19 + 10 + 10)/4 = 15
What expression should I use?
SUM(score)/COUNT(call_id) is not correct in my case
Hi,
see the attached example. You have to aggregate by employee and supervisor to get the right numbers.
Good luck!
Rainer
im confused. what is it that you want to do?
Hi,
see the attached example. You have to aggregate by employee and supervisor to get the right numbers.
Good luck!
Rainer
I want to calculate average for each employee and supervisor and then to calculate average for each employee.
Average score for each employee should be calculated as average for each supervisor and then average from these results.
For example, one supervisor gives score "1" nine times and the second supervisor gives score "10" one time. So the average should be
(1(average for 1st supervisor) + 10 (average for 2nd supervisor))/ 2 (count supervisors) = 5.5
Hi, Rakitskiy
you should change you expression in upper table to :
SUM(
aggr(
SUM(score)/COUNT(call_id), employee, supervisor
)
)
/
COUNT(distinct supervisor)
First you sum the SUM(score) / COUNT(call_id) with aggregate through employee and supervisor dimensions, then you divide it by count of distinct supervisors.
Is this the solution?
Regards,
Miha
That's what I need. Thank you
Hi,
I didn't understand. Wat is call_did? Anyways,
Use aggregation, if u want to calculate the average score for each employee.
aggr(sum(scores),employee id).