Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Connecting two tables with 3 keys.

Good day!

Colleagues, how to connect correctly two tables with 3 the same fields?:

Source1: 

LOAD WareHouse,  

     Nomenclature,

     Date,  

     Volume 

FROM 

[Test.xlsx] 

(ooxml, embedded labels, table is Source1);  

 

Source2: 

LOAD WareHouse,  

     Nomenclature,

     Date,  

     Volume1

FROM 

[Test.xlsx] 

(ooxml, embedded labels, table is Source2);

Thanks

9 Replies
settu_periasamy
Master III
Master III

How do you want the output?

eduardo_sommer
Partner - Specialist
Partner - Specialist

You can concatenate both tables, or join them.

For the first alternative, use this:

Source1:

LOAD WareHouse, 

     Nomenclature,

     Date, 

     Volume

FROM

[Test.xlsx]

(ooxml, embedded labels, table is Source1); 

Concatenate (Source1)

LOAD WareHouse, 

     Nomenclature,

     Date, 

     Volume1

FROM

[Test.xlsx]

(ooxml, embedded labels, table is Source2);

Regards

Eduardo

sinanozdemir
Specialist III
Specialist III

I would probably concatenate them:

Just rename Volume1 to Volume

Capture.PNG

And your results will look like this:

Capture.PNG

markodonovan
Specialist
Specialist

Try

Creating a composite key.

This video might help.

https://youtu.be/piCSMmHbm64

Thanks

Mark

Not applicable
Author

when you say connect, are you wanting one table with the same 3 fields but the data from all 3?

if so, you will need to use Load as ,field name> to get the field names from all tables to be the same - from the data above, Volume1 as Volume.

You do not really need to include the Concatenate statement because QlikView will do an automatic concatenation when loading tables and all of the fields are the same

eduardo_sommer
Partner - Specialist
Partner - Specialist

But, if he wants to have Volume separated from Volume1, the concatenate is needed

Not applicable
Author

depending on the reuirement, that is a true statement and agree 100%.  If there is a volume field and a volume1 field once the tables are concatenated/joined he could have an issue with nulls

Not applicable
Author

Qlikview by default performs join but you may see synthetic table.

You can use Join or Concat to resolve the keys.

Table1:

Load

Join

Table2:

Load

Thanks,

SV

Not applicable
Author

the current data model as-is will be crating those synthetic keys unless a concatenate or join is done to get both tables into one

see synthetic keys being created below