Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
gidon500
Creator II
Creator II

find new items

Hi

i have to 2 lists of items , I need to find the new ones , that are not available on the other list .

enclosed is a file

sheet list1 is long list that includes all

sheet list2 is short list

sheet list3 is the list I want to get

those are the iitems that are on list1 and not on list2

thanks

gidon

1 Solution

Accepted Solutions
mambi
Creator III
Creator III

try this :

B:
LOAD * INLINE [
item,desc
100,PC
103,BLUE-NB
];
 

A:
load item,desc, if(Exists(item),1,0) as flag;
LOAD * INLINE [
item,desc
100,PC
101,NB
103,BLUE-NB
104,SERVER
];


View solution in original post

2 Replies
swuehl
MVP
MVP

You can use EXISTS() function for that:

LOAD item, desc, 'Old' as Status FROM list2;

LOAD item, desc, 'New' as Status FROM list1 WHERE NOT EXISTS(item);

This will create a single table with a status field, if you just want to create list3 table

OLD:

LOAD item, desc FROM list2;

list3:

NOCONCATENATE LOAD item, desc FROM list1 WHERE NOT EXISTS(item);

DROP TABLE OLD;

mambi
Creator III
Creator III

try this :

B:
LOAD * INLINE [
item,desc
100,PC
103,BLUE-NB
];
 

A:
load item,desc, if(Exists(item),1,0) as flag;
LOAD * INLINE [
item,desc
100,PC
101,NB
103,BLUE-NB
104,SERVER
];