I am relatively new to Tableau and I am wondering if there is a way to calculate null values in a column. I have a column called Email of type string and want to know how many people have not entered their email i.e. Null.
I tried to create a calculated field with count(ISNULL([Email]))
But this gives me the total count and not the count of null.
Thanks.
You cannot count NULL
since COUNT
ignores NULL
s.
You can do this, though:
SUM(IF ISNULL([Email]) THEN 1 ELSE 0 END)
Per your additional comment, if you wanted to count where two fields are both NULL
then:
SUM(IF ISNULL([Email]) AND ISNULL([Phone]) THEN 1 ELSE 0 END)
You can continue this for any number of fields, as needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With