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: 
Not applicable

How to exclude '*' values in set analysis.

Hi there,

Just want to know if there is any way to exclude the field which contained character '*'.

I have tried the following but not luck.

count({<FieldA={"*"}-{"**"}>} id)

Anyone have any idea?

Best Regards,
Karl

1 Solution

Accepted Solutions
rwunderlich
MVP
MVP

To work around the problem of the * being misinterpreted as a wildcard, I would use the set search argument:

{"=index(FieldA,'*')>0"}

Then the exact syntax depends on whether you want to remove FieldA  * strings from the current set:

=Count({<FieldA-={"=index(FieldA,'*')>0"}>}FieldA)

or select the set where FieldA does not contain *

=Count({<FieldA=-{"=index(FieldA,'*')>0"}>}FieldA)


Note the only difference between the two is in the use  of -= or =-.


-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

3 Replies
Not applicable
Author

Aha, I come up with a compromise solution, that is, use 'if' clause to rename the data '**' to '999999' in the load script, then in the set analysis

count({<FieldA={"*"}-{"999999"}>} id)


Not applicable
Author

To perform forced exclusion of a string you should use '~' before the specific field set analysis.


To include '*' char in string comparison set you should use escape solution (like char(42))


Something like this: Count( {$<~FieldA= {"*$(=chr(42))*"}>} id)


Try different ways to escape '*' char..


Hope that will help you..

rwunderlich
MVP
MVP

To work around the problem of the * being misinterpreted as a wildcard, I would use the set search argument:

{"=index(FieldA,'*')>0"}

Then the exact syntax depends on whether you want to remove FieldA  * strings from the current set:

=Count({<FieldA-={"=index(FieldA,'*')>0"}>}FieldA)

or select the set where FieldA does not contain *

=Count({<FieldA=-{"=index(FieldA,'*')>0"}>}FieldA)


Note the only difference between the two is in the use  of -= or =-.


-Rob

http://masterssummit.com

http://robwunderlich.com