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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add selection into load statement

I need help, how to put the following logic into load statement. Shouldn't be rocket science, but I just can't get it right! 🙂

I am first loading table 1 (header) with load statement :

TABLE1:

Load

ID

FROM A1.qvd;

I know that there is only 1 ID in the source, which keeps changing every minute. Next I need to load only that ID into table 2.

TABLE2:

Load

ID,

Date,

TIME

FROM

B1.qvd;

How can I select to load only the data with ID from table 1, into table 2?



1 Solution

Accepted Solutions
Not applicable
Author

Use JOIN between table...

TABLE1:

Load

ID

FROM A1.qvd;

TABLE2:

INNER JOIN(TABLE1) Load

ID,

Date,

TIME

FROM

B1.qvd;

View solution in original post

7 Replies
Not applicable
Author

If I understand your problem correctly, you need to do a resident:

TABLE2:

load x,

y,

z

resident TABLE1;

Not applicable
Author

Yes, but how to do the syntax in my case? I have fields ID, Date & TIME in my data...

Smile

Not applicable
Author

Use JOIN between table...

TABLE1:

Load

ID

FROM A1.qvd;

TABLE2:

INNER JOIN(TABLE1) Load

ID,

Date,

TIME

FROM

B1.qvd;

Not applicable
Author

Thank you! This was, what I was looking for! Yes

Not applicable
Author

For some reason I am not able to load more than one table using inner join. I would like to read in the 1st table as a validator for the rest of the tables B1, C1 etc. So basically:

TABLE1:

Load

ID

FROM A1.qvd;

TABLE2:

INNER JOIN(TABLE1) Load

ID,

Date,

TIME

FROM

B1.qvd;

INNER JOIN(TABLE1) Load



ID,

Date,

TIME

FROM

C1.qvd;

INNER JOIN(TABLE1) Load

ID,

Date,

TIME

FROM

D1.qvd;







Not applicable
Author

For some reason I am stuck with a similar problem again. I have 2 identical files (Danish_customers, Other_Customers). I would need a report to compare which Customers exist both in Danish_customers and Other_Customers. Something like this:

Danish_customers:

LOAD

CUSTOMERID,

CUSTOMERNAME

FROM Danish_customers.xlsx;

Other_Customers:

INNER JOIN(Danish_customers)

LOAD

CUSTOMERID,

CUSTOMERNAME

FROM Other_Customers.xlsx;

For some reason I end up with a report including ALL customers (All Other+Denmark) instead of getting a list of just the customers that exist both in Denmark and other places. What is it I am doing wrong here?

Example of the data:

Danish_customers:

CUSTOMERID CUSTOMERNAME

1234 Johnny Appleseed

2345 Jorgos Aviorikos

....

Other_customers:

CUSTOMERID CUSTOMERNAME

B3203 John Smith

2345 Jorgos Aviorikos <-- same as in Danish_customers

....
In this case I would like to collect only the customer 2345 in my final report.

bismart
Creator
Creator

Try this simpler approach using 1 table...

Customers:

LOAD
CUSTOMERID,
CUSTOMERNAME,
'DANISH' as [Customer Type]
FROM Danish_customers.xlsx;

LOAD
CUSTOMERID,
CUSTOMERNAME,
'OTHER' as [Customer Type]
FROM Other_customers.xlsx;


Create report

Dimension: CUSTOMERID
expression: count([Customer Type])

Sort by expression descending...