Power BI, counting distinct nulls

Viewed 889

I have a data table from which I need to count unique blank fields. This how it looks like:

City Workers

Berlin null

Berlin null

Paris null

Paris null

The total result of blanks/nulls should be 2. Is there a measure that could do this? I tried using COUNTBLANK but it gives me a total number which I don't need.

Thank you in advance

1 Answers

Try this below measure-

distinct_city_count = 
CALCULATE(
    DISTINCTCOUNT(your_table['City']),
    FILTER(
        your_table,
        your_table['Workers'] = BLANK()
    )
)
Related