The COUNTDISTINCT function counts the number of each unique value in a column. The results are ordered the same way as the GROUP function, alphabetically by list item.
The syntax for the COUNTDISTINCT function is
COUNTDISTINCT( values )
Let's look at a COUNTDISTINCT function example.
The following example is based on the above text from an Excel spreadsheet:
COUNTDISTINCT( A:A )
-> [2, 1]