Qlik equivalent for Not Equal to (!=,NEQ,<>)

  • How-Tos FAQs
  • November 8, 2020
Get Started Transforming Your Data in Snowflake - feature img

Qlik equivalent for Not Equal to (!=,NEQ,<>)

Qlik equivalent for Not Equal to, (!=)   OR (<>) is an equivalent function to NEQ or NOT EQUALS TO that you may find in different programming languages.

So which is used in Qlik?

Well, that depends on where you use it.

We will cover how to implement NOT EQUAL TO in these categories as it’s found in Qlik.

  1. In an Expression
  2. In Set Analysis
  3. In a LOAD Statement

In an Expression:

Syntax:

(EXPRESSION) != (EXPRESSION)

The comparison is not case sensitive and will return True when the expressions are not equal. When you compare the expression to a list, a single non-matching value will not equal.

Strict NOT EQUAL to is also used, simply with an additional EQUALS Sign

(EXPRESSION) !== (EXPRESSION) 

The comparison is case sensitive and will return True when the expressions are exactly not equal. A single case-sensitive non-matching value in a list will evaluate to not equal.

For set analysis:

Use “-=” when dealing with static values. This operator denotes values that do not match and can be used on either side of the equals sign.

{$<Region-={'USA'}>}

In a LOAD Statement:

One would use “<>” to show NOT EQUAL TO a value. Whereas what we would use in a SQL Statement for NOT IN () will be replaced by NOT Match() or NOT WildMatch():

CustomerSales:

Load Sales,

      Cost,

      Discount

From

..\Ouptut\MyCSVFile.csv

where (CustomerClass <> 'Premium');

...where NOT wildmatch(SubRegion ,'Americas Group','Americas Attributed');

...where NOT match(Product_Key, 5,6);

 

The match function  is a case-sensitive comparison of the first parameter against all the following parameters and will return the numeric location of the expressions that match.

The wildmatch function  is NOT case sensitive in the comparison and allows for wildcard characters such as ( * and ?).

  • * is interpreted against any sequence of characters
  • ? is interpreted against any single character

So there you have it the Qlik equivalent for Not Equal to (!=,NEQ, <>)


Up Next: Learn how to understand Qlik Set Analysis

Related Posts

Qlik

Qlik Date Conversion for SAP

  • How-Tos FAQs
  • October 28, 2020
Qlik

Qlik resident load examples 

  • How-Tos FAQs
  • November 3, 2020
Qlik

How to Start Loving the Qlik Synthetic Key

  • How-Tos FAQs
  • October 27, 2020