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

List box search question: How to search for a string value in between numbers?

Hello all,

I have a list box where there are a list of values.

I would like to search for all the values where it is NumberNumberZUNumberNumber, i.e. search for only values where ZU exists between two numeric values at the start and end.


Any idea how to search like this in a list box?

Doing *ZU* does not work because it brings in values where ZU exists anywhere.

5 Replies
Anil_Babu_Samineni

Can you provide few rows and expected result on wall?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
avinashelite

try like

*Number *ZU*NUmber*

marcus_sommer

Please provide some of these values and also what are the more common pattern and how look the exceptions.

- Marcus

jblomqvist
Specialist
Specialist
Author

Hello all,

I have thousands of values so here is some sample:

Blank (as in nothing

Unknown (as a string)

EE124DD

KOL12234KK

33KG33

KG1200

So what I want is just where KG exists between two numeric values like the above example.

Would doing ??KG?? work in a list box?

marcus_sommer

Unfortunately there is no wildcard for a number and therefore you couldn't use a normal listbox-search. But you could use a search-expression like:

isnum(mid(Field, index(Field, 'KG')-2, 2))*isnum(mid(Field, index(Field, 'KG')+2, 2))

which could be also stored within a parametrized variable here: (vSearch2) for an easier usage like:

isnum(mid(Field, index(Field, $1)-2, 2))*isnum(mid(Field, index(Field, $1)+2, 2))

and then you could call the variable with:

- Marcus