Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlik Sense Scripting Syntax? (not equal)

Hi all,

I'm having problems with scripting a set analysis and I noticed when I look up the correct syntax to use in qlik... it's changed on the resource site?  For instance, I'm trying to use a "not equal" scripting syntax for a set analysis on version 3.2 SR4 which I thought was

"-=" (it executes).  However, because I was having issues with operators not executing as written, I looked up the scripting syntax and now see that for 3.2 "not equal" is written as "!=" (which doesn't execute)...

QlikSyntaxNotEqual.PNG

Does someone know the correct way to write:

[field1] "not equal" $(variable1) and,

[field2] "not equal" $(variable2) and,

[field3] = $(variable3)

5 Replies
m_woolf
Master II
Master II

[field1] <> $(variable1) and

[field2] <> $(variable2) and

[field3] = $(variable3)

Digvijay_Singh

Not sure but I think you are looking at the wrong place. This documentation looks like for the security rules design in QMC administration. I think its not related to set analysis expression design.

Chanty4u
MVP
MVP

yes its qmc qliksense

if you are looking in script  you can try this

Where not Match([Seller Type], 'SIG MM', 'SIG SM', 'CST');

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The syntax for not equal in Set Analysis is: Note the minus comes after =.

{<[field1] =- $(variable1)>}


A minus before the = means "remove this value from the current selections".

{<[field1] -= $(variable1)>}


There is a subtle difference. In the clear state, they may return the same results if there are no nulls.  If selections have been made in the field, they will return different results.


Another set modifier syntax for not equals is:

{<[field1] = "<>$(variable1)">}


I believe that will always return the same results as =-


-Rob




Chanty4u
MVP
MVP