Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

How do I exclude values from a List Box using Alternate States?

I have two list boxes with the same dimension.  When I make a selection in the first list box, I do not want that same value available for selection in the second list box.  How can I do this?

13 Replies
cliff_clayman
Creator II
Creator II
Author

This is probably not possible or not relevant, but can it work the other way around meaning if someone clicks something in Group2 first?

Not applicable

Use the below in the 1st list box

=Aggr(If(GetSelectedCount(ProductName, False(),'Group2') = 0, ProductName, Only({1<ProductName = e({Group2} ProductName)>} ProductName)), ProductName)

sunny_talwar

Unable to test this because I have QV11 SR5 installed on my machine at work, but try this out

=Aggr(If(GetSelectedCount(ProductName, False(),'Group2') = 0, ProductName, Only({1<ProductName = e({Group2} ProductName)>} ProductName)), ProductName)

sunny_talwar

Actually, when I tested, I saw a slight loophole in the expression.

Try these:

=Aggr(If(GetSelectedCount(ProductName, False(),'Group2') = 0, Only({1} ProductName), Only({1<ProductName = e({Group2} ProductName)>} ProductName)), ProductName)

=Aggr(If(GetSelectedCount(ProductName, False(),'Group1') = 0, Only({1} ProductName), Only({1<ProductName = e({Group1} ProductName)>} ProductName)), ProductName)

Attached the updated qvw with this email.

Best,

Sunny