Average
Last updated
Was this helpful?
Last updated
Was this helpful?
Whilst some tools will let you calculate other types of average, like Median or Mode, most will default to displaying the Mean average, i.e. the sum of a set of numbers divided by how many numbers there are.
In most cases, this will be the average within a field of numerical data, though you might also want to average a filtered subset of numbers or a list of numbers provided by you, e.g. as an array [2,7,8,3]. All the average functions below will allow you to choose either a set of numerical values or specify your own.
=~AVERAGE!~(‹number_array›) =~AVERAGE!~(‹number1›«, number2», «numberN»)
NB. If you want to calculate the Median or Mode average, you can do so using: =~MEDIAN!~(‹number1›«, number2», «numberN») =~MODE!~(‹number1›«, number2», «numberN»)
~AVG!~(‹measure›)
Use the Summarize tool (in the Transform palette):
(group by field, average by measure).
‹measure›.~avg!~; ‹number_array›.~avg!~;
~AVG!~(‹measure›)
numpy.~mean!~(‹number_array›)
NB.:
This requires the numpy
library to be imported.
The above example assumes a variable has been declared for profit
. For more information, go to .