Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Try this (check field and values name)
Avg({$ <jobtype = {'Salesman'}>} sales)
If i want to calculate Avg(Sales) in the scripting how can i calculated.
Try with this also
=Avg({<jobtype = {'Salesman'}>} sales )
Or
=Avg( If( jobtype = 'Salesman' ,sales ))
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;