Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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];

View solution in original post

5 Replies
Not applicable
Author

count([Date Termed])

Not applicable
Author

count([Date Termed])

Not applicable
Author

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
Author

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
Author

try this

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