Search

Search Scripts

Scripting Reference Guides

Rick W

Tableau BI Aggregation Functions

Illustrations of aggregation functions within Tableau.


A. SUM:

Total Sales = SUM([Quantity] * [UnitPrice])

This example computes the sum of the product of Quantity and UnitPrice for each row in the Sales table, resulting in the total sales amount.

B. AVG:

Average Revenue = AVG([Revenue])

This example calculates the average revenue by dividing the sum of the Revenue column in the Orders table by the number of rows in the table.

C. MIN:

Minimum Sales = MIN([SalesAmount])

This example retrieves the minimum value from the SalesAmount column in the Sales table.

D. MAX:

Maximum Profit = MAX([Amount])

This example retrieves the maximum value from the Amount column in the Profit table.

E. COUNT:

Total Customers = COUNT([CustomerID])

This example counts the number of rows in the Customer table, providing the total number of customers.

F. COUNTD:

Unique Products = COUNTD([ProductID])

This example counts the number of distinct ProductID values in the Products table, indicating the total number of unique products.

Previous Article Tableau SQL Statistical Functions
Next Article Tableau BI Scripting for Logical Functions
Print
218