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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load data from from two tables

I need to pick specific order lines within an order number.

Table1:

Load

[Enumber]

Resident Invoices where [MqatNr]='D102326';

Table2:

Load

[Enumber],

[MaterialNr], as [Mtrl],

[InvoiceText] as [FText]

Resident Table1 where [ProdH_L1]='11' and [Enumber]=[Enumber].Table1:

It´s the bold part at the end of the last line i cannot get working.

kindly

Håkan

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi

there is a function called Exists which will look for values already loaded in the fieldname in other tables that are already loaded.

Table1:

Load

[Enumber]

Resident Invoices where [MqatNr]='D102326';

Table2:

Load

[Enumber],

[MaterialNr], as [Mtrl],

[InvoiceText] as [FText]

Resident Table1 where [ProdH_L1]='11' and Exists([Enumber]);

Make sure no other table previously loaded doesn't have the field  [Enumber] except Table1

jagan
Partner - Champion III
Partner - Champion III

Hi,

You can try using Exists() like below

Table1:

Load

[Enumber]

Resident Invoices where [MqatNr]='D102326';

Table2:

Load

[Enumber],

[MaterialNr], as [Mtrl],

[InvoiceText] as [FText]

Resident Table1 where [ProdH_L1]='11' and Exists([Enumber]);

OR you can use Left Keep like below

Table1:

Load

[Enumber]

Resident Invoices where [MqatNr]='D102326';

Table2:

LEFT KEEP(Table1)

Load

[Enumber],

[MaterialNr], as [Mtrl],

[InvoiceText] as [FText]

Resident Table1 where [ProdH_L1]='11' ;

Hope it helps you.

Regards,

Jagan.

sasiparupudi1
Master III
Master III

Use ApplyMap ..

[Map Table]:

Mapping Load

[Enumber],

1 as Flag

Resident Invoices

where [MqatNr]='D102326';

Table2:

Load

[Enumber],

[MaterialNr], as [Mtrl],

[InvoiceText] as [FText]

Resident Table1

where [ProdH_L1]='11'

And ApplyMap('Map Table',[Enumber],0)=1;

HTH

Sasi

muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

Table1:

Load Distinct

[Enumber]

Resident Invoices where [MqatNr]='D102326';

Table2:

Load

[Enumber],

[MaterialNr], as [Mtrl],

[InvoiceText] as [FText]

Resident Table1 where [ProdH_L1]='11' and Exists([Enumber],[Enumber]);

Drop table Table1;

Muthukumar Pandiyan