Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
pennetzdorfer
Creator III
Creator III

Listbox search operator for "unequal"

Hey,

when I want to make a selection like "ALL minus XY" I usually pick "XY" from a listbox and "Select Excluded" from the context menu.

Example: Select all countries apart from Austria

  1. Select Austria from Countries listbox
  2. Right-click, Select Excluded

Result: In the "Current Selections" I see "NOT Austria".

Is there search expression for listboxes in order to get the same result directly?  I guess there should be a "unequal" operator ...

I already tried

  • <> 'Austria'
  • = NOT 'Austria'

Regards,

Florian

1 Solution

Accepted Solutions
Not applicable

I got your question wrong.

You can use - before your selection to exclude that in the search

Thanks

Mhatim

View solution in original post

8 Replies
Not applicable

Please see the attached the QV application

You can use any of the expressions

Regards

Mhatim

MayilVahanan

Hi

Try like this

Document properties-trigger-> select the Countries field name , add trigger "Onselect", SelectExcluded , Field -> Countries

SO whenever you select the field, its excluded that and show the remaining field..For example, when u select Austria, its select other than Austria in Countries list box.

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable

Hi,

try this in the list boxe's general tab:

Field-> Expression -> Edit...

=if(Countries='Austria',null(),Countries)

Have fun

MC



Not applicable

I got your question wrong.

You can use - before your selection to exclude that in the search

Thanks

Mhatim

pennetzdorfer
Creator III
Creator III
Author

Thanx mhatim - that's exactly what I meant!

For alphanumeric it works perfectly, but what if I have numeric values in my listbox? Example: a listbox containing discounts in %   --> I want to select all sales positions that didn't have a 100% discount.

Self-evidently, the minus operator doesn't work in that case ...

Regards,

Florian

Not applicable

Use < 100%

pennetzdorfer
Creator III
Creator III
Author

Oh ... sure!

It has been a long day

Thanks!

erichshiino
Partner - Master
Partner - Master

If that was a different number, althought you can not use, for instance, <> 5 and -5 would not make sense, you could use >5<5 to ignore just the number 5 ( or even to create any other range)

Regards,

Erich