Returns the average of an entire column, the averages per group, the weighted average of an entire column, or weighted averages per group.
Syntax
AGGAVG(ValueColumn)
AGGAVG(ValueColumn, Group)
AGGAVG(ValueColumn, , Weight)
AGGAVG(ValueColumn, Group, Weight)
ColumnAggregateAvg(ValueColumn)
ColumnAggregateAvg(ValueColumn, Group)
ColumnAggregateAvg(ValueColumn, , Weight)
ColumnAggregateAvg(ValueColumn, Group, Weight)
Input
ValueColumn | is a value column |
Domain type: | any Value domain |
Group | is the 'group by' column |
Domain type: | any Class, ID, Group or Bool domain |
Weight | is the weight column |
Domain type: | any Value domain |
Output
AGGAVG(ValueColumn) or ColumnAggregateAvg(ValueColumn) |
|
returns: |
the average value of a column |
Domain: |
the value domain of the input column |
AGGAVG(ValueColumn, Group) or ColumnAggregateAvg(ValueColumn, Group) |
|
returns: |
average values per group |
Domain: |
the value domain of the input column |
AGGAVG(ValueColumn, , Weight) or ColumnAggregateAvg(ValueColumn, , Weight) |
|
returns: |
a weighted average value |
Domain: |
the value domain of the input column |
AGGAVG(ValueColumn, Group, Weight) or ColumnAggregateAvg(ValueColumn, Group, Weight) |
|
returns |
weighted average values per group |
Domain: |
the value domain of the input column |
Notes:
Tips:
Usable in
Examples
TabCalc example:
OutCol1 = AGGAVG(Area)
OutCol2 = AGGAVG(Area,Landuse)
OutCol3 = AGGAVG(Area,,Weights)
OutCol4 = AGGAVG(Area,Landuse,Weights)
Parcel |
Landuse |
Area |
Weights |
OutCol1 |
OutCol2 |
OutCol3 |
OutCol4 |
00123 |
Residential |
4000 |
2 |
10000 |
5000 |
10818 |
4800 |
00124 |
Residential |
3500 |
1 |
10000 |
5000 |
10818 |
4800 |
00125 |
Commercial |
17500 |
4 |
10000 |
17500 |
10818 |
17500 |
00126 |
Residential |
7500 |
1 |
10000 |
5000 |
10818 |
4800 |
00127 |
Industrial |
20000 |
? |
10000 |
20000 |
10818 |
? |
01272 |
Institutional |
12500 |
2 |
10000 |
12500 |
10818 |
12500 |
04625 |
Residential |
5000 |
1 |
10000 |
5000 |
10818 |
4800 |
Advanced example
Use the following syntax to write output values from a table Parcel into in a new column of another existing table Landuse:
Landuse.AvgParSize = AGGAVG(Parcel.Area,Parcel.Landuse)
Landuse.tbt |
Parcel.tbt |
||||
Dom. |
|
Dom. |
|
|
|
Residential |
1000 |
00123 |
Residential |
4000 |
|
Commercial |
2000 |
00124 |
Residential |
3500 |
|
Industrial |
5000 |
00125 |
Commercial |
17500 |
|
Institutional |
4000 |
00126 |
Residential |
7500 |
|
.... |
... |
00127 |
Industrial |
20000 |
|
01272 |
Institutional |
12500 |
|||
04625 |
Residential |
5000 |
Landuse.tbt after aggregation |
||
Dom. |
|
|
Residential |
1000 |
5000 |
Commercial |
2000 |
17500 |
Industrial |
5000 |
20000 |
Institutional |
4000 |
12500 |
... |
... |
... |
The average value of column Area in table Parcel grouped by Landuse, is written into column AvgParSize in table Landuse.
See also:
Aggregate Column (dialog box) |