Announcements
cancel
Showing results for
Did you mean:
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?

1 Solution

Accepted Solutions
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)

6 Replies
Creator III

Hi Xavier,

Try Something like this:

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

Regards

Chris

MVP

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

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?

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)

MVP

not Dimension like '*test*'

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!