Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average per department

Hi,

I want to be able to calculate an average sales per salesperson per department for my app.  I have several different departments, each with a corresponding sales figure, and the number of people working in each department may also vary. Now I want to know how they stack up,and therefor calculate an average for them all, however I need to have an dynamic calculation since the different numbers may change.

I need a formula that looks at my the total sales for each department av then divides it by the total number of ppl working at that department. My formula looks like this (but i cant get it to work properly):

(SUM (Sales)/COUNT(DISTINCT[Salesperson]))

Cheers,

Nils

1 Solution

Accepted Solutions
manideep78
Partner - Specialist
Partner - Specialist

See the attached Qvw

View solution in original post

7 Replies
Not applicable
Author

Try

(SUM (Sales)/  aggr(COUNT(DISTINCT[Salesperson]), Department) )

Not applicable
Author

hi

try this

SUM (Total  Sales) / COUNT(Total  [Salesperson])

Not applicable
Author

thanks for all the replies, however im sorry but none of these seem to work. they are all returning blank tables. this feels like a no brainer (i do this in excel all the time). could you please have another look?

Anonymous
Not applicable
Author

Please share some of your (dummy) data in a Qlikview document.

Not applicable
Author

sorry, yeas, here it is....

manideep78
Partner - Specialist
Partner - Specialist

See the attached Qvw

Not applicable
Author

excellent tnx!