Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

weight average

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

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

see the attached example. You have to aggregate by employee and supervisor to get the right numbers.

Good luck!

Rainer

View solution in original post

6 Replies
Not applicable
Author

im confused. what is it that you want to do?

Not applicable
Author

Hi,

see the attached example. You have to aggregate by employee and supervisor to get the right numbers.

Good luck!

Rainer

Not applicable
Author

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

Not applicable
Author

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



Not applicable
Author

That's what I need. Thank you

syed_muzammil
Partner - Creator II
Partner - Creator II

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).