user14104064
user14104064

Reputation:

Power BI, counting distinct nulls

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

Upvotes: 2

Views: 1568

Answers (1)

mkRabbani
mkRabbani

Reputation: 16908

Try this below measure-

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

Upvotes: 1

Related Questions