This function computes the number of distinct values in an array.
Parameter
a - A Number array.
Return value
The return value is an Integer.
Example
The return value of the following statement is 4.
DistinctCount([1.45, 2.63, 38.1, 1.45, 23.9])
This function computes the number of distinct values referred to by a DBField.
Parameter
a - Values of a DBField or a formula field.
Return value
The return value is an Integer.
Example
If you build a report about customer order, the return value of the following statement is 19.
DistinctCount(@"Order Date")
This function is used to count the number of distinct values referred to by the first argument.
Parameters
Return value
Returns a Number type value.
Examples
Number x = DistinctCount(@dbfield, @dbfield1)Number x = DistinctCount(@formula, @formula_groupby)Number x = DistinctCount(@dbfield, @parameter_groupby)Number x = @dbfield;
Number y = DistinctCount(x); // system will prompt you that there is no such kind of function.