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: 
prat1507
Specialist
Specialist

Make a listbox with excluding values

hi All

My query is if I've a listbox say Fruits

Fruits:

Apple

Banana

Pineapple

Mango

Strawberry

I want to Create a listbox as:

Fruits:

Apple

Banana

Pineapple

Mango

Strawberry

Not Mango

If someone selects Not Mango, it must reflect in all the charts showing + I must be able to select Not Mango and Banana together.

Any kind of help will be appreciated. Thanks in advance.

Regards
Pratyush

23 Replies
antoniotiman
Master III
Master III

Hi,

See Attachment.

Regards,

Antonio.

prat1507
Specialist
Specialist
Author

Hi Pankaj

I've already tried implementing this but it is impossible to select NOT Mango and Strawberry together.

Regards
Pratyush

effinty2112
Master
Master

Hi,

     This is very resource intensive and may be no good for a lot of data.

Add a new listbox on field Fruit and assign it to a new alternative state, Not. Label the listbox 'Not'.

Add a listbox with expression

=Aggr(if(isnull(GetCurrentSelections('','','','','Not')),Fruit ,only({$-Not}Fruit )),Fruit )

Add this textbox:

=if(sum(Trees)-sum({Not}Trees)>0,sum(Trees)-sum({Not}Trees),sum(Trees))

If you select Mango or any other fruit in the Not list you should get the result you need. This may not be practical for large data sets.

Good luck.

Andrew

antoniotiman
Master III
Master III

Which is the result of

" Not Mango and Banana together." ?