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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Evan0211
Creator II
Creator II

Data loading - Need to join three tables

I will start by saying i did not develop this data model, but I have to work within it. Basically, i am having trouble joining three tables to get the data that I need.

Table 1

Product ID Product Description

 

Table 2

Product ID Store ID

 

Table 3

Store ID Store Name

 

I need to create an table (For this I will just call it table 4) and it needs to hold the Product ID, the Store ID, and the Store Name. I am coming from a SQL background and I am not sure how Qlik joins work and how I can accomplish this. Can anyone lend some assistance? 

I have tried 

Labels (2)
1 Reply
KGalloway
Creator II
Creator II

Does it need to be a separate table?

Qlik will automatically associate these tables in an app since the field names are the same (Product ID and Store ID). So you could go ahead and create a table in your app with those 3 fields and it would work.

If you want to join them explicitly, you can put join statements between each table load in your load script. For example,

table1: load [Product ID], [Product Description] from Source;

join

table2: load [Product ID], [Store ID] from Source;

join 

table3: load [Store ID], [Store Name] from Source;

You could then load a fourth table from that:

table4: load distinct [Product ID], [Store ID], [Store Name] resident table1;

 

Let me know if I can clarify anything.