Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Not equal not working?

The following expression works great:

if((Color= 'Red') OR (Color = 'Green') OR (Color = 'Green'),Color)

And I found somewhere that -= is NOT EQUAL.  However, the next code gives me an error:

if((Color -= 'Yellow') AND (Color -= 'Purple') AND (Color -= 'Orange'),Color)

The error is ") Expected"

1 Solution

Accepted Solutions

Re: Not equal not working?

Try:

if(Color <> 'Yellow' AND Color <> 'Purple' AND Color <> 'Orange',Color)


You do not need all the brackets

4 Replies

Re: Not equal not working?

Try:

if(Color <> 'Yellow' AND Color <> 'Purple' AND Color <> 'Orange',Color)


You do not need all the brackets

bhagirath
Contributor III

Re: Not equal not working?

not equal  -= this syntax has implication only inside set analysis modifiers

Sum({<Color -={'Yellow' , 'Purple','Orange'}>}quantity)


here you can not use <> as not equal symbol

MVP
MVP

Re: Not equal not working?

Hi,

You can also try Match() for this

=If(Not Match(Color, 'Yellow', 'Purple', 'Orange'), Color)

Regards,

jagan.

nagarjuna_kotha
Valued Contributor II

Re: Not equal not working?

Hi

Instead of that u can also use " <> ".

Regards,

Nagarjuna

Community Browser