distinct
Returns the number of distinct elements in a column.
Examples
Determine the number of different (distinct) models sold.
distinct(Sales_Acme.Sales.model_name)Determine the number of different models sold by city.
distinct(Sales_Acme.Sales.model_name, byGroup(Sales_Acme.Sales.city))Syntax
distinct(<object> expr, [groupBy(...)])- expr : any Incorta data type
-
groupBy: optional grouping functionReturns
longor as manylongs as there are groups ifgroupByis used
Notes
You must include all the leading grouping dimensions in the Insight from the top-down to the level-based measure you want to evaluate. See Aggregation with Level Based Measure in Aggregating Functions.