Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using where in qlik

I have a field named inhabited, the possible values are null (displayed in qlik as - ) or a date.

I want to count how many fields are null and how many have a date filled in.

How do I do this in Qlik?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

NullCount(inhabited)                                                // For Null count

Count(inhabited) - NullCount(inhabited)                 // For Date count

View solution in original post

4 Replies
tresesco
MVP
MVP

NullCount(inhabited)                                                // For Null count

Count(inhabited) - NullCount(inhabited)                 // For Date count

Not applicable
Author

len(date) >0

len(date)=0

amit_saini
Master III
Master III

Katleen,

You can try something like this:

First Method:

count(if(match(inhabited,'Null'),inhabited))--> For calculating Null values

count(if(match(inhabited,'Date'),inhabited))--> For Calculating Date values

Second Method: You can also count values by using where in script, see example below for calculating "Null" , similarly try for "Date"

load *

where
Inhabited = Null
;

Thanks,

AS

aveeeeeee7en
Specialist III
Specialist III

Hi Katleen

Create a Text Box and paste the below expressions:

For Nulls use:

=Count(Distinct if(Len(Trim(inhabited))=0,'Nulls'))

For Filled Dates use:

=Count(Distinct if(Len(Trim(inhabited))>0,'Dates'))

Hope that works for you.

Regards

Aviral Nag