Partilhar via


Aggregate Functions (Report Builder)

Aggregate functions are used to perform calculations on a single value or a set of values to return a single value for a formula. For example, suppose you want to know the number of customers that purchase specific products from you. The SUM aggregate function can add the number of customers for each product together to return a single value for each product. Instead of the number of customers per product, suppose you want to know how many customers you actually have—that is, the number of unique instances of each customer. Using the COUNTDISTINCT aggregate function, you can determine how many unique customers you really have.

Aggregate functions can use the following data types: DateTime, Integer, Decimal, Float, EntityKey, String, or Numeric.

In This Section

Topic Description

AVG

Returns the average (arithmetic mean) of all non-null values within a set.

COUNT

Returns the number of non-null items within a set.

COUNTDISTINCT

Returns the number of non-null distinct instances of an item within a set.

MAX

Returns the maximum value in a set.

MIN

Returns the minimum value in a set.

STDEV

Returns the standard deviation of non-null values in a set.

STDEVP

Returns the population standard deviation of non-null values in a set.

SUM

Returns the sum of all the values within in a set.

VAR

Returns the variance of non-null values in a set.

VARP

Returns the population variance of non-null values in a set.

See Also

Concepts

Using Functions (Report Builder)
Working with Formulas (Report Builder)
Report Builder How-to Topics

Help and Information

Getting SQL Server 2005 Assistance