0% found this document useful (0 votes)
64 views

Aggregate Functions: Tableau Desktop Reference Guide

Aggregate functions in Tableau allow users to summarize data by calculating metrics like average, count, maximum, minimum, and correlation across datasets. These functions return a single value and have "AGG" displayed when used on a shelf or Marks card. Functions like AVG, COUNT, MAX, and MIN calculate averages, counts, maximums, and minimums respectively. CORR, COVAR, and COVARP calculate correlation and covariance to measure joint variability between two expressions. Functions must use aggregated or disaggregated expressions consistently.

Uploaded by

Sneha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Aggregate Functions: Tableau Desktop Reference Guide

Aggregate functions in Tableau allow users to summarize data by calculating metrics like average, count, maximum, minimum, and correlation across datasets. These functions return a single value and have "AGG" displayed when used on a shelf or Marks card. Functions like AVG, COUNT, MAX, and MIN calculate averages, counts, maximums, and minimums respectively. CORR, COVAR, and COVARP calculate correlation and covariance to measure joint variability between two expressions. Functions must use aggregated or disaggregated expressions consistently.

Uploaded by

Sneha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Tableau eLearning

Aggregate Functions
Tableau Desktop Reference Guide
The aggregate functions allow you to summarize data, for example by calculating the average of numbers in a measure. Aggregate functions perform a
calculation on a set of values, at the level of granularity of the view, and return a single value. An aggregated calculation appears with the letters AGG in
front of it when placed on a shelf or on the Marks card.

To calculate a population and sample standard deviation and variance, use the STDEV, STDEVP, VAR, and VARP functions.

To calculate the measure or extent of joint variability of two expressions, use the CORR, COVAR, and COVARP functions.

NOTE The expressions used in any function must either all be aggregated or all disaggregated. The MAX, MIN, and ATTR functions allow you to have all
expressions in a function use a similar aggregation level.

Examples
These are examples of the aggregate functions:

Function Syntax Purpose Example


AVG(expression) Returns the average of all the values in the AVG([Sales]) returns $500 if the average of the
expression. [Sales] values is $500.
SUM, MEDIAN, PERCENTILE, STDEV, STDEVP,
VAR, VARP are similar
COUNT(expression) Returns the number of items in a group. Nulls are COUNT([Vendor ID]) will return 123, if there are
not counted. 123 records that have non-null [Vendor ID] field
values.
COUNTD(expression) Returns the number of unique items in a group. COUNTD([Vendor ID])will return 50 if there are
only 50 records that have unique [Vendor ID] field
values.
MAX(expression)
MIN is similar Returns the maximum of an expression across all MAX([Sales]) returns $1,000 if $1,000 is the largest
records. number in [Sales].
ATTR(expression) Returns the value of the expression if it has a ATTR([Segment]) returns ‘Corporate’ if the value
single value for all rows, otherwise it returns an of [Segment] is ‘Corporate’ at the level of
asterisk (*). This allows you to check if values are granularity in the view, otherwise it returns ‘*’.
the same.

1 of 2
TABLEAU.COM/ELEARNING
CORR(expression1, expression2) Returns the Pearson correlation coefficient of the CORR([Sales], [Profit]) returns a value from -1 to 1.
two expressions. The result is equal to 1 for an exact positive linear
relationship, 0 for no linear relationship, and -1
for an exact negative linear relationship.
COVAR(expression1, expression2) Returns the sample covariance of two expressions. COVAR([Sales], [Profit]) returns a positive number
If the two expressions are the same, a value is if the expressions tend to vary together, on
COVARP is similar, but for a population, instead of
returned that indicates how widely the variables average.
a sample
are distributed.

2 of 2
TABLEAU.COM/ELEARNING

You might also like