Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional Count in expression

I have created a conditional count in an expression, however when I show this as a count in a pivot it shows it as '-1' and does not count this.  How can I count this correctly?

My formula in my expression is below:

 

Count

({$<[1HR Start Date]={'In Process'}>} [1HR Start Date])

and

count({$<[HR Recruitment]-={''}>} [HR Recruitment])

Although the output filters the correct records it does not count in the pivot table (last column)

1.jpg

Any help appreciated

Phil

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You've created a boolean expression, so possible results are 0 and -1 or FALSE and TRUE.

If you want to get a count of something, try like this:

Count({$<[1HR Start Date]={'In Process'}, [HR Recruitment] -={''} >} [1HR Start Date])

Instead of [1HR Start Date] you might need to count another field, whatever seems appropriate to your requirements.

View solution in original post

3 Replies
swuehl
MVP
MVP

You've created a boolean expression, so possible results are 0 and -1 or FALSE and TRUE.

If you want to get a count of something, try like this:

Count({$<[1HR Start Date]={'In Process'}, [HR Recruitment] -={''} >} [1HR Start Date])

Instead of [1HR Start Date] you might need to count another field, whatever seems appropriate to your requirements.

Anonymous
Not applicable
Author

This worked great.  Thanks

Phil

Anonymous
Not applicable
Author

This worked great.  Thanks

Phil