Returns the average of the values of a measure field.
Example - Calculate the Average Amount of an Opportunity Grouped by Type
Use avg() to compare the average size of opportunities for each account type.
q = load "DTC_Opportunity";
q = group q by 'Account_Type';
q = foreach q generate 'Account_Type' as 'Account_Type', avg('Amount') as 'avg_Amount';
See Also