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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script to compare list

I have two lists, A and B.  I would like to write a script: If items from list A is in list B, then replace with blank.  Similar to the Exclusion definition in Set Analysis.

4 Replies
pokassov
Specialist
Specialist

Hi!

I didn't get the whole task, but could you see on script bellow?

A:

Load

itemA

from ...;

B:

load

itemB

from...

where not exists(itemA, itemB);

load

null()     as itemB

from ...

where exisis(itemA, itemB);

petter
Partner - Champion III
Partner - Champion III

Exists() function wrapped in a Not() in a WHERE clause of the LOAD statement should work for you. If there is more than one key-field you might have to construct a temporary key. You might even have use of the Mapping Load with an AppyMap.

Could you give us more specifics? Like how is the structure of these "lists"? Is it tables and what are the fields/columns that should be used to match them?

Not applicable
Author

Tried but doesn't seem to work.  On Reload, it says that it cannot find itemA in the Where clause.  How would the load for itemB knows of the existance of itemA to evaluate the Where clause?

Not applicable
Author

I did this and it worked:

A:

Load

itemA

from ...;

Load * where not exists(itemA,itemB);

load

itemB

from...;