Use Data aggregation and statistical functions in Tableau.
Data aggregation refers to summarizing detailed data to a higher level. Tableau does this
automatically when you drag fields into rows, columns, or shelves.
Example:
Let’s assume you're analyzing Sales Data with the following fields:
Order Date
Region
Sales
Profit
Common Aggregation Functions:
The most commonly used functions in tableau are listed below:
SUM: sum of values
AVG: average of values
MIN: minimum of values
MAX: maximum of values
VAR: variance of sample population
VARP: variance of entire population
STDEV: standard deviation of sample population
STDEVP: standard deviation of entire population
COUNT: count of values
Tableau Sum Function
The Tableau Sum function is employed to seek out the Sum of records during a column.
Syntax:
SUM(Expression)
Example:
To demonstrate these Tableau aggregate functions, we've to use the Calculated Field. Please
navigate to Analysis Tab and choose the Create Calculated Field (choice to create a calculated field
and use sum aggregate function).
Tableau Avg Function
The Tableau Avg or average function is used to calculate the Average.
Syntax:
AVG(Expression)
Example:
As you'll see from the below screenshot, we are creating a replacement field (Sales Average) using
Tableau function.
Tableau MIN Function
The Tableau MIN function is an aggregate function in Tableau, which is employed to seek out the
minimum value.
Syntax:
MIN(Expression1, Expression2)
Example:
The Tableau MIN function accepts two arguments. Use this to find the smallest between two
numbers.
Tableau MAX Function
The Tableau MAX function is employed to seek out the utmost value.
Syntax:
MAX(Expression 1, Expression 2)
Example:
In Tableau, the MAX function accepts two arguments. Use this to find the largest among two
numbers.
Tableau VAR Function
The Tableau VAR function is an aggregate function in tableau, which is used to find the Variance of
the sample population.
Syntax:
VAR(Expression)
Tableau VARP Function
The Tableau VARP function is employed to seek out the Variance of the whole population.
Syntax:
VARP(Expression)
Tableau STDEV Function
The Tableau STDEV function is one of the aggregate functions in tableau, which is used to find the
standard deviation of the sample population.
Syntax:
STDEV(Expression)
Tableau STDEVP Function
The Tableau STDEVP function is for locating the quality deviation of the whole population.
Syntax:
STDEVP(Expression)
Tableau COUNT Function
The Tableau COUNT function is one of the Tableau aggregate function, which is used to find the
number of not null values.
Syntax:
COUNT(Expression)
5. Show Data Visualization using Tableau.