Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
huytran
Partner - Contributor
Partner - Contributor

How to take record in table but not in another table even it have a few records same in both

Hi Qlik community,

I'd like to ask a question: I have a 3 data tables which were load to Qlik sense app.

           + Table Vendor:Vendor.JPG

 

           + Table AllInfo:Allinfo.JPG

            + Table Cost:Cost.JPG

I want to create a table which is existed in table Vendor but not in table cost. Result below:Result.JPG

 Do you have any ideas how I can do?

Thanks.

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps like this:

Incl:
LOAD distinct JobNUmber as InclJobNumber
From Vendor;

Excl:
LOAD distinct JobNumber as ExclJobNumber
From Cost;

All:
LOAD Enquiry, JobNumber, Amount, RID, Type
FROM AllInfo
Where Exists(InclJobNumber, JobNumber) 
	And Not Exists(ExclJobNumber, JobNumber);
	
DROP Table Incl, Excl;

If you need to apply this logic to both the JobNUmber and Enquiry fields, then use a concatenation in the Incl and Excl loads and in the exists statements.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein