Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

How to do a count on field only if another field is not null

I am trying to do a count of users who currently have a termed date in our system.  I have the following fields, [Full Name] and [Date Termed].  I just need the number of users where the [Date Termed] is not null.

1 Solution

Accepted Solutions
Not applicable

Re: How to do a count on field only if another field is not null

write this syntax in expression

if([Date Termed]<>'',count([Full Name]))

************************************************

or in script writ this

load

[Full Name]

count(if([Date Termed]<>'',[Full Name])) as countFullname

from table

group by [Full Name];

5 Replies
Not applicable

Re: How to do a count on field only if another field is not null

count([Date Termed])

Not applicable

Re: How to do a count on field only if another field is not null

count([Date Termed])

Not applicable

Re: How to do a count on field only if another field is not null

write this syntax in expression

if([Date Termed]<>'',count([Full Name]))

************************************************

or in script writ this

load

[Full Name]

count(if([Date Termed]<>'',[Full Name])) as countFullname

from table

group by [Full Name];

Not applicable

Re: How to do a count on field only if another field is not null

now what if i wanted to do it for after a specific date, say 01-01-2014?  I can't get the syntax right for the where clause.

Not applicable

Re: How to do a count on field only if another field is not null

try this

if(date([Date Termed],'DD-MM-YYYY')>'01-01-2014',COUNT([Full Name]))

Community Browser