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

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

Associating Data from more than 1 Table

I have created a Data Script with two different tables and a unique key. When I create a straight table I can see all fields in the properties but cannot report across the tables - i.e. I get all data from Table 1 and blank results for the fields from Table 2.

Any advice on what I'm doing wrong ?

8 Replies
lmonincx
Creator II
Creator II

HI,

Do you mean the content of the fields from the second table is empty?

Are you sure the content in you key's are inline ( match)?

Could you provide me a sample of your qvw to have a look?

Linda

Not applicable
Author

Can you try using a left join when loading the script?

Table_Master:
LOAD
link_Key,
customer,
Product,
invoice_no
LineAmount,
CurrencyCode;
SQL SELECT *

FROM Table1;

Left join(Table_Master)
LOAD
link_Key,
description;
SQL SELECT *
FROM Table2;

Not applicable
Author

Hi

In the original file, the fields are complete but when I try and report on them the second table data fields are either empty or I get two rows of independent data (one for each table)...In the eg. below, "Customer" is the "key".

Thanks for any help.

Toby

Customer Insurance Limit USD DSO Next Review Date Current (in USD) Internal Rating
507004436401.11
50702509/30/200975
512008/31/200975
5250041469.36
52505109/30/200975
535108/31/200975
545508/31/200975
546008474725.51
54609709/30/200975
54890385696.62
548909/30/200975
575401825230.02
576608420603.56
577680000002559556.65


biester
Specialist
Specialist

Hi,

can you at least post a snapshot of the data structure (Table Viewer)?

Rgds,
Joachim

Not applicable
Author

Not applicable
Author

Thanks for the advice - sorry, my Qlikview skills aren't that advanced that I can get this script to run..

biester
Specialist
Specialist

Hi,

well, in fact the key is a synthetic one (which should be avoided for performance reasons but nevertheless works) and not just "Customer" but "Customer" and "Country". I could imagine that you have Customer AND Country fields in both tables, but in ONE of them only Customer is filled (and country perhaps is NULL). Try to add the field "Country" to the table so you se what really IS being joined. Perhaps that helps.

Regards,
Joachim

Not applicable
Author

Thanks for this,

Have tried it [as well as a left join - finally got the handle on that one] and get some better results but still not 100%. Have got an expert coming in on Monday to fix this for me so will see.

Thanks for everyone's assistance and advice.

Toby