Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to combine an exclusion and a list of selected terms in the same dimension?

I'm fairly new to Qlik Sense and I'm just getting the hang of it. And I need to select a list of company names and exclude a company name when creating different charts for example bar chart or any other chart.

I created the following expression to select the company names and it works:

= If(WildMatch(ORG_NAME, 'K', 'F', 'M', 'Mo', 'Ge', 'Gu', 'in'), ORG_NAME, Null())

But how do I set an exclusion in the same expression? For example - "K Food"? So I want to select all the companies above and exclude "K Food".

I tried the following expression but it doesn't exclude "K Food":

=If(WildMatch(ORG_NAME, '*K*', -'K Food','F', 'M', 'Mo', 'Ge', 'Gu', 'in'), ORG_NAME, Null())

Thanks,

1 Solution

Accepted Solutions
sunny_talwar

QlikView is case sensitive... are you sure the field is called K Food or is it K FOOD? Also, make sure that there is a space between K and F, not any other special character. May be try this

=If(WildMatch(ORG_NAME, '*K*', '*F*', '*M*', '*Mo*', '*Ge*', '*Gu*', '*in*') and not UPPER(ORG_NAME) LIKE 'K*FOOD', ORG_NAME, Null())

View solution in original post

7 Replies
sunny_talwar

May be this

=If(WildMatch(ORG_NAME, '*K*', '*F*', '*M*', '*Mo*', '*Ge*', '*Gu*', '*in*') and not ORG_NAME LIKE 'K Food', ORG_NAME, Null())

Anonymous
Not applicable
Author

Thank you, the syntax is ok but the "K Food" still appears in the list somehow. I will try slightly different version because we are on the right track

sunny_talwar

QlikView is case sensitive... are you sure the field is called K Food or is it K FOOD? Also, make sure that there is a space between K and F, not any other special character. May be try this

=If(WildMatch(ORG_NAME, '*K*', '*F*', '*M*', '*Mo*', '*Ge*', '*Gu*', '*in*') and not UPPER(ORG_NAME) LIKE 'K*FOOD', ORG_NAME, Null())

Anonymous
Not applicable
Author

Thank you I was wondering is Qlik is case sensitive or not and now I know.

sunny_talwar

Did it work then?

Anonymous
Not applicable
Author

Yes it worked. Thanks

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post; not visible in preview) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!