EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials Tableau Tutorial Tableau Aggregate Functions
Secondary Sidebar
Tableau Tutorial
  • Functions
    • Tableau Functions
    • Tableau String Functions
    • Concatenate in Tableau
    • Rank Function in Tableau
    • Tableau Aggregate Functions
    • Window Sum Tableau
    • LOD Expressions in Tableau
    • LOOKUP Function in Tableau
    • Tableau Fixed Function
    • Tableau Count Distinct
    • Tableau Window Functions
  • Basic
    • What is Tableau
    • What is Tableau Dashboard
    • What is Tableau Server
    • Uses of Tableau
    • Tableau Versions
    • Tableau Architecture
    • Is Tableau Free
    • Tableau New Features
    • How To Install Tableau
    • How to Use Tableau?
    • Install Tableau Server
    • Tableau Commands
  • Charts
    • Tableau Charts
    • Tableau Bar Chart
    • Tableau Chart Types
    • Donut Chart in Tableau
    • Tableau Gauge Chart
    • Funnel Chart in Tableau
    • Gantt Chart in Tableau
    • Bubble Chart in Tableau
    • Pareto Chart in Tableau
    • Sankey Chart In Tableau
    • Stacked Bar Chart in Tableau
    • Tableau Bullet Chart
    • Waterfall Chart in Tableau
    • Line Chart in Tableau
    • Heat Map in Tableau
    • Histogram in Tableau
    • CrossTab in Tableau
    • Treemap in Tableau
    • Trend Lines in Tableau
    • Tableau Reference Lines
    • Tableau Dual Axis
    • Legend in Tableau
    • Pie Chart in Tableau
    • Tableau Storyline
  • Statement
    • Tableau IF Statement
    • Case Statement in Tableau
  • Sort/Filters
    • Sorting in Tableau
    • Filters in Tableau
    • Types of Filters in Tableau
    • Tableau Action Filter
    • Context Filter in Tableau
    • Tableau Parameter Filter
    • Adding Filters in Tableau Dashboard
    • Tableau Context Filter
  • Tableau Dashboard
    • Dashboard in Tableau
    • Tableau Dashboard Examples
    • Tableau Dashboard Creation
    • Tableau Dashboard Design
    • Tableau Workbook
  • Advanced
    • Tableau Bins
    • Tableau 3D
    • Tableau Export to Excel
    • Tableau Reporting
    • Tableau Reader
    • Tableau Map
    • Tableau Viewer
    • Tableau Prep Builder
    • Tableau Bridge
    • Tableau Tooltip
    • Tableau Hyper
    • Tableau Zen Master
    • Tableau Union
    • Tableau Templates
    • Tableau Alerts
    • Tableau Reporting Tool
    • Conditional Formatting in Tableau
    • Tableau Web Data Connector
    • Tableau BI Tool
    • Data Blending in Tableau
    • Parameters in Tableau
    • Tableau Data Sets
    • Creating Set in Tableau
    • Tableau Drill Down
    • Tableau Dynamic Parameters
    • Tableau Table Calculation
    • Tableau Visualization
    • Tableau Joins
    • Pivot in Tableau
    • Data Visualization With Tableau
    • Forecast in Tableau
    • Map Layers in Tableau
    • Group in Tableau
    • Tableau Group by
    • Hierarchy in Tableau
    • Sets in Tableau
    • How to create a Set in Tableau
    • Tableau Order of Operations
    • Tableau User Group
    • Tableau Calculated Field
    • Custom SQL in Tableau
  • Interview Questions
    • Tableau Interview Questions

Related Courses

Tableau Certification Course

Business Intelligence Courses

Data Visualization Courses

Tableau Aggregate Functions

By Priya PedamkarPriya Pedamkar

Tableau Aggregate function

Introduction to Tableau Aggregate Functions

Tableau is not just a tool that makes graphs and reports, the optimum the data representation we do need the Functions in Tableau. By accessing this function just click the select aggregate from the column drop-down list to make the Create Calculated Field. Below are some of the Tableau Aggregate Functions list:

  • Number Functions
  • String Functions
  • Date Functions
  • Type Conversion Functions
  • Aggregate Functions
  • Logical Functions

From the above, we’ll see more detail about Aggregate Functions which is most commonly using.

Aggregate Functions

Aggregate functions are built-in functions that allow you to summarize or change the granularity of your data. Following are the various Aggregate functions in Tableau:

1. AVG

Average functions return the mean of all values in expression and can be used with numeric fields only.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

(Note: it will ignore the NULL values)

Syntax: AVG (expression) | Example: AVG ([Sales]) = 186

2. ATTR

The functions only return the single value for the calculated row and the NULL values can be ignored. If the condition is not meet, it will return the asterisk value.

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (86,354 ratings)

Syntax: ATTR (expresstion) | Example: ATTR ([country]) = India

3. COLLECT

COLLECT function can be used for spatial fields. It will combine the values in the argument fields and NULL values can be ignored.

Syntax: COLLECT (Spatial) Example: COLLECT ([Geometry])

4. CORR

CORR stands for correlation between the two give expressions. When we want to correlate between the two variables, it can return three values 1, 0 and -1. The values 1 represents the positive changes, 0 represents no relationship and -1 represents the negative change

Syntax: CORR (expr1, expr2)

5. COUNT

It will return the number of values present in the selected column and NULL values can’t be counted. Take the best example for this function, making a pivot table in excel by count the values-based category.

Syntax: COUNT (expression) | Example: COUNT ([‘Sales ID’)] = 45613

6. COUNTD

It will return the distinct count for the given column or a group and it will not return a NULL value. These functions will be using the source of MS excel or text or Access.

Syntax: COUNTD (expression) | Example: COUNTD (‘Country’) = 256

7. COVAR

COVER stands for covariance for the given two expressions. The positive covariance indicates the variable is moving towards in the right direction and we can be noticed in the trend. The data can be considered as a random sample.

Syntax: COVAR (expr1, EXPR2)

8. COVARP

This function is similar to covariance but it only biased with the population.

Syntax: COVARP expr1, EXPR2)

9. MAX

The MAX functions return the maximum values for the given expression. Suppose we have to see the maximum age in the given voter list. We could apply this function to see it.

Syntax: MAX (expression) | Example: MAX ([Age]) = 105

10. MEDIAN

It will return the numeric values with the median of a single expression. It will return the middle value for the given expression it will ignore the NULL values.

Syntax: MEDIAN (expression) | Example: MEDIAN (1, 2, 3, 4, 5) = 3

11. MIN

The MIN functions return the minimum values for the given expression. Suppose we have to see the minimum sales rate in the store. We could apply this function to see it.

Syntax: MIN (expression) | Example: MIN ([Sales rate]) = 5

12. PERCENTILE

This function will return the percentile for the corresponding given expression. It only returns values between 0 and 1. Suppose we’ve given a decimal value like 0.54, it will return the median value.

Syntax: PERCENTILE (expression, number) | Example: PERCENTILE ([Sales], 0.54) = 37.69

13. STDEV

It stands for standard deviation function, it will returns if there are any high or low standard deviation values for the average value constrain

Syntax: STDEV(expression)

14. STDEVP

It is similar to the standard deviation but the difference is, it will be based on a population.

Syntax: STDEVP(expression)

15. SUM

We must all know that it is a simple function that calculates the total numbers for the given range of numeric values and it can be ignored NULL values.

Syntax: SUM (expression) | Example SUM (5, 5, 5) = 15

16. VAR

The VAR stands for variance in the given expression.

Syntax: VAR (expression)

17. VARP

It is similar to the Variance but the difference is, it will be based on a population.

Syntax: VARP(expression)

How does Aggregate Function Work in Tableau?

In detail, we’ll see how to use these functions in Tableau:

  • Open a new workbook in tableau desktop and connect the data sources using the .xls file dataset. Here the dataset we can use any store sales report and calculate the average sales on weekdays. We can simply find the average of sales by drag and drop the date into row field and then make sales in the second column as average (AVG), like below,

aggregate function1

  • The problem by making AVG calculations in Tableau is based on each occurrence of the sales. But when we look deeper into the data, each sales having multiple no. of order and different products. The sample figure has been shown below,

aggregate function2

  • Here we clearly understand the calculation made by the sum of sales and created an average. The Tableau automatically takes as SUM (Sales) / COUNT (Sales). Where we need to customize it to make the average for per day or weekdays, how do we make this? Yes, we need to use the calculated field to have AVG aggregation as SUM (Sales).

aggregate function3

  • First, we need to create the daily sales total and then use this as a base to find the average sales for a day or weekdays. Then we can go to the worksheet to add this calculated field into the visualization. Add the filter to make a weekday and change the aggregation to AVG. Now we see the difference between how the Tableau default average values show and how the aggregate AVG value. The first weekday having only one sale occurrence, the next day shows the clear differences which having multiple orders with multiple products in the same sales.

aggregate function4

Conclusion

Now in this article, we have learned what is about Tableau functions and its types, Aggregate Function with an example, how to use the aggregate function in Tableau desktop. Happy analysis!

Recommended Articles

This is a guide to Tableau Aggregate Functions. Here we discuss top Aggregate Functions in Tableau, and how to use the Aggregate Functions in Tableau. You can also go through our other related articles to learn more-

  1. What is Tableau Dashboard?
  2. Transfer Functions in Matlab
  3. Aggregate Demand Formula
  4. Tableau Table Calculation
  5. Rank Function in Tableau
  6. Pivot in Tableau
  7. Tableau Context Filter
  8. Tableau Bullet Chart
  9. Examples of Python Built-in Functions
  10. Introduction to Features and Attributes of Tableau
  11. Aggregate Functions in PostgreSQL
Popular Course in this category
Tableau Training (8 Courses, 8+ Projects)
  8 Online Courses |  8 Hands-on Projects |  55+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Business Intelligence Training (12 Courses, 6+ Projects)4.9
Data Visualization Training (15 Courses, 5+ Projects)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more