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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average Sales finding

Hi I have sales field. and i have jobtype field i want to get

Avg(sales) who is working as Salesman

How can i get

Labels (1)
4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try this (check field and values name)


Avg({$ <jobtype = {'Salesman'}>} sales)

Not applicable
Author

If i want to calculate  Avg(Sales) in the scripting how can i calculated.

its_anandrjs
Champion III
Champion III

Try with this also

=Avg({<jobtype = {'Salesman'}>} sales )

Or

=Avg( If( jobtype = 'Salesman' ,sales ))

its_anandrjs
Champion III
Champion III

See the small example adopt this in your file also

Source:

LOAD * Inline

[

Year,Sales,jobtype

2010,451256,Salesman

2011,258741,Operator

2012,344345,Salesman

2013,545466,Operator

2014,355345,Operator

];

NoConcatenate

Final:

LOAD

jobtype,

Avg(Sales) as AvgSales

Resident Source

Where jobtype = 'Salesman'

Group By jobtype;

DROP Table Source;