Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Script help????

Hi Folks,

Looking for below logic:

If Category 3  to be ends with  %ECC_BEL then show Incident,

If Category 3 to be ends with %BEL_C then show  Change,

If Category 3 is null or – then Category 2 = Unclassified

I'm trying something like below , but how to check this condition only at end .

For example in this case if Category 3 = OTHERS_MMPP_ECC_BEL_C then output should be Change , but with below expression I'm getting output this as Incident.

if(wildmatch(CAT_ID, '*ECC_BEL*'),'Incident',if(wildmatch(CAT_ID, '*BEL_C*'),'Change','Unclassified')) as Category2

Thanks,

AS

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Pick(wildmatch(CAT_ID, '*ECC_BEL','*BEL_C')+1,'Unclassified', 'Incident', 'Change') as Category2

Or just remove the last '*' from your expression comparison string like,

if(wildmatch(CAT_ID, '*ECC_BEL'),'Incident',if(wildmatch(CAT_ID, '*BEL_C'),'Change','Unclassified')) as Category2


View solution in original post

2 Replies
tresesco
MVP
MVP

Pick(wildmatch(CAT_ID, '*ECC_BEL','*BEL_C')+1,'Unclassified', 'Incident', 'Change') as Category2

Or just remove the last '*' from your expression comparison string like,

if(wildmatch(CAT_ID, '*ECC_BEL'),'Incident',if(wildmatch(CAT_ID, '*BEL_C'),'Change','Unclassified')) as Category2


Peter_Cammaert
Partner - Champion III
Partner - Champion III

And if you got some spare time, please read these:

QlikCommunity Tip: How to get answers to your p... | Qlik Community

Qlik Community Tip: Posting Successful Discussion Threads

You can make this discussion useful for other people as well by using a descriptive title and adding search tags.