This section provides simple examples for how to use the
COUNTDISTINCT functions. These functions include the following:
COUNTA- Count the number of values within a group that meet a specific condition. See COUNTA Function.
COUNTDISTINCT- Count the number of non-null values within a group that meet a specific condition. See COUNTDISTINCT Function.
In the following example, the seventh row is an empty string, and the eighth row is a null value.
COUNTA function on the source column:
COUNTDISTINCTfunction on the source:
Below, both functions count the number of values in the column, with
COUNTDISTINCT counting distinct values only. The empty value for
r007 is counted by both functions.
This page has no comments.