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

How to hide values from a list box based on a given condition

Hi,

I am newbie to QV. I need to know how can I hide values in the list box whose count is 0.

I have created count by Analyst as below and I now want to hide/exclude Analysts whose count = 0. It's a 2 sec job in Excel but I can't figure it out in QV in spite of several attempts.

Thanks

Mahesh

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=IF(Aggr(Count({<Status = {'Open'}>}Status), [Assigned Analyst])>0,[Assigned Analyst])

View solution in original post

8 Replies
its_anandrjs

Hi,

How you calculate the values 39,0,1....

Regards

Anand

german_avanzato
Creator
Creator

One aproach could be use a calculate dimension (if apply).

Something like

if ( Count (YOUR_FIELD) > 0, YOURFIELD)

And then select "suppress null" in the dimension.

MK_QSL
MVP
MVP

Create a list box using below expression

Aggr(IF(COUNT(Distinct Analyst) > 0,Analyst),Analyst)


or

Aggr(IF(COUNT(Analyst) > 0,Analyst),Analyst)

its_anandrjs

Let me know how you get value 0 and calculate 0 in the list field because in the qlikview if any field is repeated twice it will show frequency 2 and if it is not then 1 and if 39 times then it would be 39. If it has repeated and has count then use   

if(Count ([Assigned Analyst]) > 0, [Assigned Analyst])

Regards

Anand

Not applicable
Author

Hello everyone thanks for your quick response. The expression I was using is similar to what's been suggested here but for some reasons it did not work in Listbox but worked fine in Pivot table by suppressing zero's.

Anand to answer to your question on how I got the values next to name - Scenario is that I am using 2 fields 1. Assigned Analyst 2. Status ( = Open,Closed,Hold etc). What below is showing is Count of "Open" Status against each analyst...expression something like this <count({<Status ={'Open'}>}Status)>

Thanks again

Mahesh

MK_QSL
MVP
MVP

=IF(Aggr(Count({<Status = {'Open'}>}Status), [Assigned Analyst])>0,[Assigned Analyst])

Not applicable
Author

This is killer works perfect for listbox too..thanks

MK_QSL
MVP
MVP

Kindly close this thread by selecting appropriate answer so that others having same type of issues can use it..