GROUPAVERAGE

Syntax

GROUPAVERAGE(<number>)

Description

Returns the average value of a group by creating a sum for all values in the group and dividing by the number of values. A GROUPBY() function must first be used in order to then find the average arguments of another column in relation to it. The value of the GROUPAVERAGE() must be a number and is returned as a float

Empty or <null> records of a group aren't calculated into GROUPAVERAGE().

Calculating a column with a (or multiple) <error> records always returns an error for its group.

This is an aggregate function

Example

Given the following data set:

user_screen_nameuser_follower_countuser_friend_countuser_time_zone
ArteWorks_SEO2605345Central Time (US & Canada)
evan_b460316Pacific Time (US & Canada)
briancoffee185321London
PhillisGene280<null>London
SsReyes44Pacific Time (US & Canada)
addztickets2910Central Time (US & Canada)
mynossseee19094Melbourne
AprilBraswell1420614082Pacific Time (US & Canada)
bebacklatersoon234103Sydney
nicolebaker76727Alaska
RNIHA93London
Object5512<error>Melbourne
tman2088108155Central Time (US & Canada)

First create a group, e.g. GROUPBY(#RawData!user_time_zone)

user_time_zone
Alaska
Central Time (US & Canada)
London
Melbourne
Pacific Time (US & Canada)
Sydney

Then use the GROUPAVERAGE(#RawData!user_friends_count), and the average value of the arguments of that column appears in relation to the GROUPBY() column.

user_time_zoneGROUPAVERAGE returns
Alaska27
Central Time (US & Canada)166.6666667
London162
Melbourne<error>
Pacific Time (US & Canada)4800.666667
Sydney27