Products Testimonials Press Plans+Pricing

Lyza

Support

Support Home Support Home | Glossary Glossary | Contact Us Contact Us
Home > Basics > Functions and Formulas > Summary > COUNTDISTINCTCOLUMN

COUNTDISTINCTCOLUMN

Description
Counts the distinct values in a column.

Syntax
COUNTDISTINCTCOLUMN(value, column1, column2, ...)


Value is the column that contains the values you want to count. Value can be a text, number, or date column.

Column1, column2,... are up to 30 optional columns that define the aggregation context for the count. Counts are calculated for each unique combination of the group_by columns.


When the result of COUNTDISTINCTCOLUMN is given as the final value for a new column in a transform worksheet, as in the example below, each row will get the value of COUNTDISTINCTCOLUMN that corresponds to its particular aggregate values.

If no group_by columns are provided, the values are counted across all rows in the output sheet.


Example

In the following we see how COUNTDISTINCTCOLUMN works with a single column. The calculated value is entered in each row.

SampleData

UnitSales
Store
=COUNTDISTINCTCOLUMN(UnitSales,Store)
NUMBER
TEXT
NUMBER
157
West4
127
Central
4
102
Central 4
353
North
4
104
East
4
105
East
4
User Comments User Comments Add Comment
Click Here to be the first to post a comment.
Was this article helpful?
Rate it:
Overall Rating
No Rating