Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting Multiple Values

Hi

I'm trying to write an expression which i can't seem to get to work, Its for a text Object, Please could someone advise what im doing wrong? Problem ID is a column of call reference numbers, and i just want to count all the calls with Open and Project Status? however when use the below it counts everything including calls with a status of Closed.

=Count( if(Status ='Open','Project',([Problem ID])) )

Any Help would be greatly appreciated

Thanks

Paul

1 Solution

Accepted Solutions
rustyfishbones
Master II
Master II

Check Dimension Limits and that you are not ticking the box to Show Others

2014-01-25_1402_001.png

View solution in original post

7 Replies
swuehl
MVP
MVP

You have included 'Project' in your THEN branch, while you should use it in your condition, IMHO.

=count( if(Status = 'Open' or Status='Project', [Problem ID]))

or

=count( if(match(Status,'Open','Project'), [Problem ID]))

or

=count( {<Status = {Open, Project}>} [Problem ID])

MayilVahanan

Hi

Try like this

=count( {<Status = {'Open', 'Project'}>} [Problem ID])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rustyfishbones
Master II
Master II

for performance,it's better to use the Set Analysis option

COUNT( {<Status = {'Open','Project'}>} [Problem ID])

Not applicable
Author

Thanks for your help, I have used =count( if(Status = 'Open' or Status='Project', [Problem ID]))

However when used in a pie chart with the same expression, it seems to be adding Others with zero? even though "Others" is not in any of the tables, Any ideas how to exclude or remove this info so it just shows Project and Open?

Qlikview.PNG.png

nilesh_gangurde
Partner - Specialist
Partner - Specialist

See You are writing expression as if Status is Open then give Project Id else Give Problem ID, hence its not working.

=Count( if(Status ='Open','Project',([Problem ID])) )


instad of that you can write the following expression.


=Count( if(Status ='Open' or Status =  'Project',([Problem ID])) )

or

=Count( {<(Status ={'Open' ,  'Project'}>}[Problem ID]) )


Hope this will help.


-Nilesh

rustyfishbones
Master II
Master II

Check Dimension Limits and that you are not ticking the box to Show Others

2014-01-25_1402_001.png

Not applicable
Author

Thanks all for you help - Much Appreciated