Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Datamodel

I have two table primary sales and secondary purchase and a master table. I have to fetch all the invoice no which present in master and primary but not in secondary purchase.

PFA of invoice no. in primary sales and secondary purchase

8 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

That file is a bit large to download. I suggest that you look here:

Preparing examples for Upload - Reduction and Data Scrambling

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

try like this:

Mater:

Load master_invoice,

*;

Primary:

Load Primary_Invoice,

*

Temp:

Load master_invoice as Invoice

resident

Mater;

Load Primary_Invoice as Invoice

resident

Mater;



Secondary:

Load Secondary_invoice,

*

where 1=if(not exists(Invoice,Secondary_invoice)='-1',1,0);


this will give you the result




Not applicable
Author

it will give the same output for exclude and overall

Not applicable
Author

any suggestion

avinashelite

Hi Shweta,

According to your requirement "I have to fetch all the invoice no which present in master and primary but not in secondary purchase."  this will work rite?

can you please share the sample data or eg if the output your expecting to achieve

Not applicable
Author

i write this query but don't work for me

Not applicable
Author

PFA of data model and output for the same. value repeated for adirace inv no table

avinashelite

try like this in the last table:

FROM
D:\QlikView\Secondary\Stage3\QVD\Purchase.QVD
(
qvd)Where 1=if(Exists(INVOICE_NO,AdiraceInvNo)=’-1’,1,0) and Bill_No like 'PD*';