Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Not applicable

Filter listbox values

Hello

How do you filter listbox values?

Eg:

I have a listbox containing customers.

Lets say i have from A to Z customers:

A

B

C

D

E

F

G

and so on.

But in my charts there is only data for A,B,D.

So i want my listbox only to show A,B,D and not all the others because they dont have any data on them.

I would think something like this, but it is not working:

=if(sum({$<"[DimCustomer].CustomerName"=>} "[FactQVTimeRegistered].TimeRegistered") >0,"[DimCustomer].CustomerName", null())

Tags (3)
1 Solution

Accepted Solutions
er_mohit
Honored Contributor II

Re: Filter listbox values

ok

then try this way

aggr(only({$<[FactQVTimeRegistered].TimeRegistered"={'>0'}>}[DimCustomer].CustomerName"),[DimCustomer].CustomerName")

11 Replies
Not applicable

Re: Filter listbox values

Check Hide Excluded in General Tab.

Not applicable

Re: Filter listbox values

No - This will only hide excluded when i have selected something. I want it to filtered when nothing at all is selected

Re: Filter listbox values

Hi,

     If they dont have any data at all, you can delete them from data model only.

     Give one where condition while loading the data in application.

Regards,

Kaushik Solanki

Not applicable

Re: Filter listbox values

I cant delete them from the data model, cause i use them elsewhere, where they have data.

But on this particulary mesure, they dont all have data.

Not applicable

Re: Filter listbox values

But wildmatch be massive, I have 100s of customers? There must be an easier way?

Re: Filter listbox values

Hi,

     Then in your data model you can create a new field which is a customer who have the value for this measure.

Regards,

Kaushik Solanki

er_mohit
Honored Contributor II

Re: Filter listbox values

ok

then try this way

aggr(only({$<[FactQVTimeRegistered].TimeRegistered"={'>0'}>}[DimCustomer].CustomerName"),[DimCustomer].CustomerName")

Not applicable

Re: Filter listbox values

Thats true! But i there is a way in qlikview i would rather do it there. But thanks!

nizamsha
Valued Contributor II

Re: Filter listbox values

aggr(only( {<fieldname={'a','b','c'}>}fieldname),fieldname)