Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

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

Tags (6)
1 Solution

Accepted Solutions
MVP
MVP

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

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

8 Replies

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

Hi,

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

Regards

Anand

german_avanzato
Contributor

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

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.

Highlighted
MVP
MVP

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

Create a list box using below expression

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


or

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

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

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

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

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

MVP
MVP

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

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

Not applicable

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

This is killer works perfect for listbox too..thanks

MVP
MVP

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

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