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: 
berryandcherry6
Creator III
Creator III

Wildmatch not validating properly with if condition

Hi,

i have a column called resident Type where i need to get sum of row which contains  "-other" String but not  "home -other " string .

Example:

Hotel -other

pg -other

home -other

home -other

Hotelwe -other

pgsds -other

i need to get sum as  4.

Now i am using below code but i get value 0. What i am doing wrong.

sum(if((wildmatch(resident Type,'*-other') and not wildmatch(resident Type,'home -other')),1,0)) = 0


1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

=Count({<[resident Type] = {'*-other'}-{'home -other'}>}[resident Type])

Capture.PNG

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

Try this:

=Count({<[resident Type] = {'*-other'}-{'home -other'}>}[resident Type])

Capture.PNG