Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Filter List Box Value from Other Currnetly Selected List Box Value in QV ?

Hi Friends,

I have below question.

I have one list box which list all the value from the table field.

I would like to Restrict/Filter all the value from this List Box,

based on the Other Selection ?

Example :

List Box 1 : State

                  NY,

                  CT,

                  VA

List Box 2 : City

                  NYC,

                  Albany,

                  Bridgeport,

                  Groton,

                  Richmond    <-as of now, it's shows all the city in list box 2 irrespective of whatever state selected in List box 1.

We would like to get below.

List Box 2 :  NYC,

                   Albany  <-if NY was selected in current selection list lox 1

List Box 2 :  Bridgeport,

                   Groton<-if CT was selected in current selection list lox 1

how can we achieve this in QV ?

Thanks for your help.

5 Replies
simenkg
Specialist
Specialist

select Expression in the drop down menu and use the expression:

Aggr(City,City)

If you want the other possible cities be visible when you select a city, use:

aggr(only({<City=>}City),City)

Not applicable
Author

Hi,

thanks for reply.

second expression is not working,

it's giving syntax error.

can you please help me with that ?

Aggr({<City=>}City,City)

simenkg
Specialist
Specialist

Aggr(only({<City=>}City),City)



Sorry about that.

Not applicable
Author

actually,

when i applied above expression,

nothing appear in the list box.

any idea ?

simenkg
Specialist
Specialist

I just tested, and it works like expected for me with the expression

=aggr(only({<City=>}City),City)

Try to clear all selected and locked selections. It should work.