Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Tags (1)
1 Reply
Not applicable

How to exclude data in load based on another QVD?

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!

Community Browser