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

Announcements
Discover how organizations are unlocking new revenue streams: Watch 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'
)