Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
reivax31
Partner - Creator III
Partner - Creator III

Function NOT LIKE

Hi Qlikers,

I'm trying to find a way to do a "NOT LIKE"  function. But it seems it doesn't exist like that in the tool. This is what I do when I want to use the Like Function:

[Dimension] like '*test*'

Someone has an idea about how to do the opposite?

Thanks for your help!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be the logic would be like:

IF(Not WILDMATCH(Dimension, '*CAT1*'), if([Dimension] like '*CAT*'), count(ref))

Better would be using set analysis like:

Count({<Dimension = {'CAT*'} - {'CAT1*'}>}ref)

View solution in original post

6 Replies
igdrazil
Creator III
Creator III

Hi Xavier,

Try Something like this:

IF(WILDMATCH(Dimension, '*test*'), SomethingHappens, SomethingElseHappens)

Regards

Chris

tresesco
MVP
MVP

'Like' operator is available in qv as well. you can try with wildmatch() too.

reivax31
Partner - Creator III
Partner - Creator III
Author

Hi,

Thanks for your quick answers. I'm trying to do it in the front end. I tried also a few things with wildmatch but no success.

Lets says my dimension can have a value like "XXXXX CAT CAT1 XXXXX". I'm trying to count all the values that have CAT but not CAT1 (for information, If there is CAT1 you always have CAT). So when I use the Like function if I want to do [Dimension] like '*CAT*' and [Dimension] notlike '*CAT1*'

With wildmatch:

IF(WILDMATCH(Dimension, '*CAT1*'), ?DONOTHING?, if([Dimension] like '*CAT*'), count(ref))

Is it possible to ask to DONOTHING? what should I put?

Thanks for your support

tresesco
MVP
MVP

May be the logic would be like:

IF(Not WILDMATCH(Dimension, '*CAT1*'), if([Dimension] like '*CAT*'), count(ref))

Better would be using set analysis like:

Count({<Dimension = {'CAT*'} - {'CAT1*'}>}ref)

swuehl
MVP
MVP

What about

not Dimension like '*test*'

reivax31
Partner - Creator III
Partner - Creator III
Author

Thanks a lot Tresesco!

The set analysis version works perfectly. I guess I have to look more in that type of expression for my next créations.

Best regadrs and have a nice day!