Average
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.
Excel
=~AVERAGE!~(‹number_array›) =~AVERAGE!~(‹number1›«, number2», «numberN»)
=AVERAGE(A:A)
// OR
=AVERAGE(2,7,8,3) // Returns 5
NB. If you want to calculate the Median or Mode average, you can do so using: =~MEDIAN!~(‹number1›«, number2», «numberN») =~MODE!~(‹number1›«, number2», «numberN»)
Tableau
~AVG!~(‹measure›)
AVG([Bonus])
Alteryx
Use the Summarize tool (in the Transform palette):
(group by field, average by measure).
OrgVue
‹measure›.~avg!~; ‹number_array›.~avg!~;
nodes().bonus.avg;
// OR
array(2,7,8,3).avg // Returns 5
tSQL
~AVG!~(‹measure›)
SELECT AVG(Profit)
FROM SalesData
Python
numpy.~mean!~(‹number_array›)
import numpy
numpy.mean([2,7,8,3]) # Returns 5.0
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 General > Variables.
Last updated
Was this helpful?