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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
v_jaideep
Creator
Creator

Wildmatch()

Hello,

I have list of 500 products, if product  contains *new* (either at start, end or in between)it should be as 'New' else it should be 'old'

I have tried pick(wildmatch(product,'*new*'),'New','Old) in script, it does not give output as Old , it just gives oytput as only 'New'.

What am I missing /doing wrong here.

1 Solution

Accepted Solutions
marcus_sommer
MVP
MVP

Try it in this way:

pick(wildmatch(product,'*new*', '*'),'New', 'Old')

or with a simple if-loop, like:

if(product like '*new*','New', 'Old')

- Marcus

View solution in original post

3 Replies
marcus_sommer
MVP
MVP

Try it in this way:

pick(wildmatch(product,'*new*', '*'),'New', 'Old')

or with a simple if-loop, like:

if(product like '*new*','New', 'Old')

- Marcus

v_jaideep
Creator
Creator
Author

Thanks Marcus, I'm looking only for wildmatch() possibilities.

emilyrabbit
Creator
Creator

if(wildmatch([product],'*new*')>0,'New','Old')