Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

NOT match function.

Hi community,  Is there anyway to make a not match function.  I know that there is a match function.  I am wondering if there is a complement to it or how one would go about doing it with an if statement?

1 Solution

Accepted Solutions
d_pranskus
Partner - Creator III
Partner - Creator III

Hi

The shortest way I came up with is to use following expression

1-SIGN(MATCH(str, expr1 [ , expr2,...exprN ]))

Cheers

Darius

View solution in original post

4 Replies
d_pranskus
Partner - Creator III
Partner - Creator III

Hi

What are you want to achieve?

This is MATCH function. It will return 0 if it doesn't find str in expr..exprN.

match( str, expr1 [ , expr2,...exprN ] )

The match function performs a case sensitive comparison.

Example:

match( M, 'Jan','Feb','Mar')

returns 2 if M = Feb

returns 0 if M = Apr or jan

Hope it helps

Cheers

Darius

Not applicable
Author

I want it to return 0 if there is a match.

d_pranskus
Partner - Creator III
Partner - Creator III

Hi

The shortest way I came up with is to use following expression

1-SIGN(MATCH(str, expr1 [ , expr2,...exprN ]))

Cheers

Darius

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can get it as many ways

     simply Not Match() gives you 0 if there is a match otherwise -1.

     1+(Match()>0) gives you 0 if there is a match otherwise -1.

     1-Sign(Match()) gives you 0 if there is a match otherwise -1.

Celambarasan