Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match Expr

Hi Experts,

How to write the below expression, I have to show this(Error and Warning) in List box as a filter. I have tried with Wildmatch but its case insensitive so I am not able to get it.

I have Prodcut column Ex: Its just an example, In real I have millions of records

Product
Abc
ABC
cBc
CBc

KZX

kYS
]

I need to expression like below:

if  PRODUCTS IN ('%b%', '%k%') as Error

if PRODUCTS IN ('%B%','%K%') as  WARNING

Then my List box should show like

Exception(Filter name)

Error

Warning

So Error should be equal to -  Abc and kYS

Warning should be equal to - ABC,cBc,CBc,KZX

I have tried like below as per Qlik Community but not working out

Pick(Wildmatch(Product,'*b*','*k*','*B*','*K*'),'Error','Error','WARNING','WARNING')

also the same in backend script like

Pick(Wildmatch(Product,'*b*','*k*','*B*','*K*'),'Error','Error','WARNING','WARNING') as flag

8 Replies
Gysbert_Wassenaar

Please don't post duplicate questions: Match Expression


talk is cheap, supply exceeds demand
jjordaan
Partner - Specialist
Partner - Specialist

You can use the Match function.

match( str, expr1 [ , expr2,...exprN ] )

The match function performs a case sensitive comparison.

Example:

match( M, 'Jan','Feb','Mar')

returns 2 if M = Feb

returns 0 if M = Apr or jan


It does the same as WildMatch only Match is case sensitive.


Hope this helps

sasiparupudi1
Master III
Master III

Please close this thread as you got your answer in the other thread already

senpradip007
Specialist III
Specialist III

Have a look on this.

Not applicable
Author

Hi Gysbert,

When I post this question, I didn't get answer for the old one...

Not applicable
Author

I am not able to delete this thread... it showing unauthorized access.. That is why I kept this thread

sasiparupudi1
Master III
Master III

Well then I suggest you close this thread by marking your reply as the correct answer.

Gysbert_Wassenaar

First discussion posted: Jul 17, 2015 12:05 PM

Second discussion posted: Jul 17, 2015 12:34 PM

Conclusion: Your patience is limited to less than half an hour.

Your life must be a very frustrating experience to you. Not to mention to those that have to live or work with you.


talk is cheap, supply exceeds demand