description | title |
---|---|
Learn more about: DISTINCTCOUNTNOBLANK |
DISTINCTCOUNTNOBLANK function (DAX) | Microsoft Docs |
[!INCLUDEapplies-to-measures-columns-tables-visual-calculations]
Counts the number of distinct values in a column.
DISTINCTCOUNTNOBLANK (<column>)
Term | Description |
---|---|
column | The column that contains the values to be counted |
The number of distinct values in column.
-
Unlike DISTINCTCOUNT function, DISTINCTCOUNTNOBLANK does not count the BLANK value.
-
[!INCLUDE function-not-supported-in-directquery-mode]
The following example shows how to count the number of distinct sales orders in the column ResellerSales_USD[SalesOrderNumber].
= DISTINCTCOUNT(ResellerSales_USD[SalesOrderNumber])
DAX query
EVALUATE
ROW(
"DistinctCountNoBlank", DISTINCTCOUNTNOBLANK(DimProduct[EndDate]),
"DistinctCount", DISTINCTCOUNT(DimProduct[EndDate])
)
[DistinctCountNoBlank] | [DistinctCount] |
---|---|
2 | 3 |