Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Box filter

Hi

How can i exclude items out of my list box, for example I want to show just the top 10 items in the list box for my end user to select (completely excluding the other entries out of my list box).

I have got the formula that I can use but i cant see where if anywhere i can add this in as a condition?

Is this functionality possible using a list box?

Thanks

Jon

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Since your saying that "I have got the formula that I can use". And need to know how to use that formula. I have given the steps below.

Right click on the list box and open properties. Then go to general tab.

Click on the drop down that you see under "Field" label as shown below.

This will open up a list then select <Expression> from the list . This will open expression dialog box where you can enter your expression.

Thanku

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

In the list box, at the end of the list of fields is the expression option. Use something like

If(Rank(Aggr(Sum(Sales), Customer)) <= 10, Customer)

for the list box expression

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Yes,

Do sth like that in your Product ListBox, create your expression in the Field (General Tab):

=Aggr(If(Rank(Sum(Sales)) <11, Product),  Product)

Fabrice

Not applicable
Author

Hi,

Since your saying that "I have got the formula that I can use". And need to know how to use that formula. I have given the steps below.

Right click on the list box and open properties. Then go to general tab.

Click on the drop down that you see under "Field" label as shown below.

This will open up a list then select <Expression> from the list . This will open expression dialog box where you can enter your expression.

Thanku

Not applicable
Author

Hi

Thanks for your answer,

The formula i have used is below which excludes and data where there is no cost or income (or thats what it is meant to do!)

This appears to work fine, and gives me a reduced list of options in the list box, however when i select one option instead of the other options turning grey as per a normal list box they are completey excluded.

How can i adjust my formula / settings to include all options based on the options filtered in the formula?

 

=

Aggr(If(
(
fabs(ROUND(Sum(COST)))+fabs(round(sum(revenue)))
) <>0,
[Customer]),[Customer]
)