6 Replies Latest reply: Dec 2, 2015 6:17 AM by Xavier HEMELAAR

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?

• Re: Function NOT LIKE

Hi Xavier,

Try Something like this:

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

Regards

Chris

• Re: Function NOT LIKE

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

• Re: Function NOT LIKE

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?

• Re: Function NOT LIKE

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)

• Re: Function NOT LIKE

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!