Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.