The AvgNonNull function returns the average (arithmetic mean) of values in a number column, excluding null values.
Avg (numbers, break_col, break_value)
numbers references the column that contains the numbers on which the average is calculated.
break_col is an optional parameter that references a break column.
break_value is an optional parameter that returns the average of non-null numbers column where value in break_col equals break_value.
If constant values in the break_value column are substituted for data items, dates and text strings must be enclosed in single quotes. |
The following examples show the results of inserting the AvgNonNull function in three separate tables.
In this example, the AvgNonNull function is used on the numeric column. The results are shown in the Computed column
AvgNonNull (Amount)
In this example, the AvgNonNull function is used on the numeric column and break_column. The results are shown in the Computed column
AvgNonNull (Amount, State)
In this example, the AvgNonNull function is used on the numeric column, break_column, and break_value. The results are shown in the Computed column.
AvgNonNull (Amount, State, ‘CA’)