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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to search for wildcards in set-analysis?

Hi,

I have fields containing the value '?'.

Now I want to count those fields like:

count({1<[Field] = {'?'}>} [Field])

But this does not only apply to fields with '?', it interpretates the ? as a wildcard and sums up other fields like 'a' and 'b'.

The question is, how can I write the {'?'} expression, so that I get what I want?

thanks

1 Solution

Accepted Solutions
sunny_talwar

How about this:

Count({1<[Field] = {"=WildMatch(Replace(Field, '?', '|'), '*|*')"}>} [Field])

View solution in original post

8 Replies
sunny_talwar

Like this:

Count({1<[Field] = {'*?*'}>} [Field])

sunny_talwar

Or this:

Count({1<[Field] = {"=WildMatch(Field, '*?*')"}>} [Field])

Anonymous
Not applicable
Author

Like this:

Count({1<[Field] = {'*?*'}>} [Field])


___


This version returns all of my fields as true

Anonymous
Not applicable
Author

Or this:

Count({1<[Field] = {"=WildMatch(Field, '*?*')"}>} [Field])


___

This version returns none of my fields as true

Anonymous
Not applicable
Author

Thanks for the fast answer, but both methods don't work as I need them to

sunny_talwar

How about this:

Count({1<[Field] = {"=WildMatch(Replace(Field, '?', '|'), '*|*')"}>} [Field])

marcus_sommer

Slightly different but with the same approach:

count({< [Field]= {"=[Field]<>purgechar([Field],'?')"}>} [Field])

- Marcus

Anonymous
Not applicable
Author

Both of the last two answers work as I intended them to work - thanks for the help

The code is not quite as simple as one should assume though, but now one can look it up in this thread^^