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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between tables.

Hi, good afternoon!

I have the following question, I have two tables "termination" and "ComplementaryTerminations" where the key among them is cdn_emresa, cdn_estab, cdn_funcionario, month and year. How can I load a third table that is the result of everything that is on Terminations + which has no counterpart in "ComplementaryTerminations"?

example

terminations

Emp Est Employ Month Year

1      1      1     10       2013

1      1      2     10       2013

1      1      4     10      2013

1      1      5      10     2013

ComplementaryTerminations

Emp Est Employ Month Year

1       1      1        10     2013

1       1      3        10     2013

1       1      4        10     2013

1       1      5        10     2013

FinalTable

Emp Est Func Month Year

1       1    1       10      2013

1       1    2       10      2013

1       1    3       10      2013

1       1    4       10      2013

1       1    5       10       2013

1 Reply
MayilVahanan

HI

Use Not exists() function;

Try like this

TableA:

Load * Inline

[

Emp,Est,Employ,Month,Year

1,1,1,10, 2013

1,1,2,10, 2013

1,1,4,10,2013

1,1,5,10,2013

];

TableB:

Load * Inline

[

Emp,Est,EmployB,Month,Year

1,1,1,10, 2013

1,1,3,10, 2013

1,1,4,10,2013

1,1,5,10,2013

];

NoConcatenate

FullTable:

LOAD * Resident TableA;

Concatenate(FullTable)

LOAD Emp,Est,EmployB AS Employ,Month,Year Resident TableB where not Exists(Employ,EmployB);

DROP Tables TableA,TableB;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.