Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to exclude data in load based on another QVD?

Is there a way to exclude data being loaded from one QVD based on values in another QVD?  Sample code is below.  What I am trying to do is when I load the DetailTable, exclude records that have certain values in masterCategory.  masterDetailLink and detailLink can be used for the lookup.

For example, if detailLink (which corresponds to masterDetailLink) exists in the Master.qvd file with a value of 'M' or 'R' for masterCategory, then the record should not be loaded from the Detail.qvd file.  If the masterCategory is anything other than 'M' or 'R', it should be loaded.

Any help is much appreciated!

MasterTable:
LOAD
     masterCode,

     masterDetailLink
     masterCategory
FROM

(qvd)

DetailTable:
LOAD
   
    detailCode,
    detailName,
    detailValue,

    detailLink as masterDetailLink

   
FROM

1 Reply
Not applicable
Author

Hi,

For this you can use the function exists(), it should be something like this:

MasterTable:
LOAD
     masterCode,

     masterDetailLink
     masterCategory
FROM

(qvd)

DetailTable:
LOAD   
    detailCode,
    detailName,
    detailValue,

    detailLink as masterDetailLink   
FROM

where not exists(masterDetailLink);

Hope this helps

Regards!