Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

COUNT with multiple conditions

Hello,

I have the following expression:

COUNT ({$<[Progress]={'Started','On hold','Completed'} , [Current Phase]={'Plan','Execute','Close'}, [Global]={'On Track'} > } [Project NAME])

The COUNT returns  0 instead of 25.

Actually on my table I have multiple rows with:

- only the value 'Started' for  'Progress'

- only the value  'Execute' for 'Current phase'

I think this is the reason.

Capture.PNG

The first Expression is :

COUNT ({$< [Global]={'On Track'} > } [Project NAME])

Its returning 11.

Thanks in advance for your help.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Now It is working.

I deleted Current Phase column in my Excel file, and created it from scratch!

View solution in original post

16 Replies
sunny_talwar

Would you be able to share a sample or sample data to see what you have?

stabben23
Partner - Master
Partner - Master

Hi,

why not do a count(Project NAME) and add 3 listbox, Progress, Current Phase, Global, then Select in this listboxs 'Started','On hold','Completed' and 'Plan','Execute','Close' and 'On Track', what will Your Count value be?

Note that Your set analysis is AND not OR, this means that all values must match to Count Your Project NAME.

Anonymous
Not applicable
Author

Your code is ok, can be something in your database.

Have you checked that everything is okay?

Anonymous
Not applicable
Author

Hello Sunny,

Here is a sample:

Capture.PNG

Thanks

sunny_talwar

So, based on these 5 rows, you should be getting 5 as a count using this

Count({$<[Progress]={'Started','On hold','Completed'} , [Current Phase]={'Plan','Execute','Close'}, [Global]={'On Track'} > } [Project NAME])

Is that not what you are getting? You get 0?

Anonymous
Not applicable
Author

Yes, I need on 'OR' expression. How can I Do it?

I don't want to use listbox because I have many expressions that needs to be calculated automatically.

stabben23
Partner - Master
Partner - Master

Of cource you want it automatically, its just a way to troubleshoot. As you show in Your pic above, Your Expression should gives you 5 rows. Do you have any other Expressions in the chart?

Anonymous
Not applicable
Author

yes I get 0. I want to get 5.

Anonymous
Not applicable
Author

Yes, I have other expression that showing 0 also .