DISTINCTCOUNTNOBLANK
How many different values a column holds, leaving blanks out.
Group: Aggregation. Compatible with DAX.
Syntax
DISTINCTCOUNTNOBLANK ( <column> )
| Parameter | Type | Description |
|---|---|---|
column | Column | The column whose different values are counted. |
Returns
Whole number. How many different values the column has, not counting a blank.
Remarks
- It is
DISTINCTCOUNTwithout the blank: the two differ by one exactly when the column has a blank cell in the filter context. - When no value is left, the result is BLANK.
Examples
Different prices
EVALUATE
ROW (
"With the blank", DISTINCTCOUNT ( Holdings[Price] ),
"Without it", DISTINCTCOUNTNOBLANK ( Holdings[Price] )
)
| With the blank | Without it |
|---|---|
| 4 | 3 |