Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Announcements
Qlik's 15-week Applied Data Analytics using Qlik Sense course. Classes start Jan. 17, 2022. SIGN UP
cancel
Showing results 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
MVP

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

8 Replies
MVP

Hi,

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

Regards

Anand

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.

MVP

Create a list box using below expression

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

or

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

MVP

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

MVP

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

Not applicable
Author

This is killer works perfect for listbox too..thanks

MVP

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