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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sudms
Contributor
Contributor

How to use a wildmatch function inside a Match function

Hello Guys,

I am trying to replace nested if with Pick Match function, but I am stuck at using Wildmatch inside the Match function like,

pick(
     Match( -1,
           Subjects = 'Stat',
           WildMatch(Name,'YYY*')
     )+1
,'NA'
,'Low'
,'High'
)

Here if you see my 2nd condition is not working.

Any help would be appreciated.

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

Just add a comparing to the wildmatch(), like:

pick(
     Match( -1,
           Subjects = 'Stat',
           WildMatch(Name,'YYY*') > 0
     )+1
,'NA'
,'Low'
,'High'
)

View solution in original post

2 Replies
Or
MVP
MVP

Wildmatch() never returns -1. It returns the number of the match, or 0 if no match was found, same as Match().

marcus_sommer

Just add a comparing to the wildmatch(), like:

pick(
     Match( -1,
           Subjects = 'Stat',
           WildMatch(Name,'YYY*') > 0
     )+1
,'NA'
,'Low'
,'High'
)