Count Distinct (Expression Function)

Purpose

The Count Distinct function (COUNT_DISTINCT) is used to count the number of unique values returned by a certain query. It does not add the values together to achieve that use the Sum function. If the total number of values is needed regardless of duplicates then the Count function should be used.

Parameters

The Count Distinct function has one parameters:

Field Value

Allowed Inputs: field values

The parameter of the Count Distinct function are the field values to be counted. The input is a query built using the Query Builder to find field values on one or many record(s) in a table.

Output

The output of the Count Distinct function is a number representing a count of all the unique values found.

Example

If an Invoice record has 4 related Line Item records, and those records have values of -6, 8, 8, and 24 in the Quantity field, COUNT(${Line Item ~> Quantity}) would result in 3.

expression function - count distinct.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024