Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

dennis_o
New Contributor III

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

Tags (2)
1 Solution

Accepted Solutions

Re: How to search for wildcards in set-analysis?

How about this:

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

8 Replies

Re: How to search for wildcards in set-analysis?

Like this:

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

Re: How to search for wildcards in set-analysis?

Or this:

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

dennis_o
New Contributor III

Re: How to search for wildcards in set-analysis?

Like this:

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


___


This version returns all of my fields as true

dennis_o
New Contributor III

Re: How to search for wildcards in set-analysis?

Or this:

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


___

This version returns none of my fields as true

dennis_o
New Contributor III

Re: How to search for wildcards in set-analysis?

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

Re: How to search for wildcards in set-analysis?

How about this:

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

Re: How to search for wildcards in set-analysis?

Slightly different but with the same approach:

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

- Marcus

dennis_o
New Contributor III

Re: How to search for wildcards in set-analysis?

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^^

Community Browser