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

Wildcard filter in list box?

Hi,

    I have a list box, I want it to only show records starting with BEL..and exclude all others that don't start with BEL

Lets say the dimension name is MODEL_CODE.

MS

1 Solution

Accepted Solutions
Not applicable

Hi,

Try with this:

If(left(FieldName, 3) = 'BEL', FieldName)

Regards,

Ricardo

View solution in original post

8 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this expression for the listbox:

=aggr(if(left(MODEL_CODE,3)='BEL',MODEL_CODE),MODEL_CODE)


talk is cheap, supply exceeds demand
Not applicable

Hi,

Try with this:

If(left(FieldName, 3) = 'BEL', FieldName)

Regards,

Ricardo

MayilVahanan

Hi

PFA

Hope  it helps

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

Thank you again Gysbert,

though the solution you gave, eliminates any model other than BEL, but when I make a selection on listbox(with the expression =aggr(if(left(MODEL_CODE,3)='BEL',MODEL_CODE),MODEL_CODE)) ,all the other values disappear, ie only one value appears in the list box, I want the list box to show other BEL models

MS

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Remove the aggr: =if(left(MODEL_CODE,3)='BEL',MODEL_CODE)


talk is cheap, supply exceeds demand
swarup_malli
Specialist
Specialist
Author

I tried this code in the script editor

IF(model_code like 'BEL',1,0) as flag_model_code

But the thing is its also showing records starting with "Bel"..I want BEL..and not Bel..cos el is lower case

swarup_malli
Specialist
Specialist
Author

Hi Mayil,

    Thank u , but its not case sensitive, I want it to eliminate "Bel"    Cos el is lower case, only records starting with BEL should be fished out.

Can it be done ?

Thanks

SM

MayilVahanan

HI

Then try like this

If(Left(MODEL_CODE,3)='BEL',MODEL_CODE) As MODEL_CODE

Hope it helps

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