Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
markella92
New Contributor

how exclude records that matches between two tables

hi guys, how  can exclude records that matches between two tables in QlikSense with LOAD statement?

I post pic SQL side, i need QlikSense side.

Thanks

Labels (2)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: how exclude records that matches between two tables

It could be done with an exists-clause like:

load * from Salary;

load * from Employee where not exists(ID);

- Marcus

5 Replies
MVP & Luminary
MVP & Luminary

Re: how exclude records that matches between two tables

It could be done with an exists-clause like:

load * from Salary;

load * from Employee where not exists(ID);

- Marcus

markella92
New Contributor

Re: how exclude records that matches between two tables

without inner join?
MVP & Luminary
MVP & Luminary

Re: how exclude records that matches between two tables

To check the existence of fieldvalues within a load against already loaded fieldvalues of this field is no join necessary. Depending on your requirements you might need to adjust the load-order and/or to rename fields because exists() checks the values against the symbol-table and not against the data-tables but even then it's often easier to handle as joining-approaches.

On the bottom of the following post you will find several examples and explanations for the use of exists especially in scenarios which needs to keep qvd-loadings optimized: Advanced-topics-for-creating-a-qlik-datamodel.

- Marcus

markella92
New Contributor

Re: how exclude records that matches between two tables

can i pass more than 2 fields to function not Exists()?
MVP & Luminary
MVP & Luminary

Re: how exclude records that matches between two tables

You might use multiple exists() like:

where exists(Field1) and exists(Field2);

or maybe using exists() with a second expression-parameter like:

where exists(KEY, ID & '|' & YearMonth);

whereby both approaches will result in unoptimized loads but this mustn't be a showstopper if the dataset isn't too large.

- Marcus