Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

philmywallet
New Contributor III

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
MVP
MVP

Re: Conditional Count in expression

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.

3 Replies
MVP
MVP

Re: Conditional Count in expression

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.

philmywallet
New Contributor III

Re: Conditional Count in expression

This worked great.  Thanks

Phil

philmywallet
New Contributor III

Re: Conditional Count in expression

This worked great.  Thanks

Phil

Community Browser