Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
NullCount(inhabited) // For Null count
Count(inhabited) - NullCount(inhabited) // For Date count
NullCount(inhabited) // For Null count
Count(inhabited) - NullCount(inhabited) // For Date count
len(date) >0
len(date)=0
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
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