Partilhar via


COUNTDISTINCT (Report Builder)

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

Syntax

COUNTDISTINCT(aggregate)

aggregate

Specifies the field name or expression to aggregate.

Remarks

  • Null values are ignored.

Examples

Formula Result

COUNTDISTINCT(City)

Counts the number of unique values in the City field.

See Also

Concepts

Working with Formulas (Report Builder)
Using Functions (Report Builder)
Aggregate Functions (Report Builder)
Report Builder How-to Topics
Working with Literals in Formulas and Filters (Report Builder)
Formatting Data, Text, and Images (Report Builder)

Help and Information

Getting SQL Server 2005 Assistance