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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stsk
Contributor
Contributor

help joining multiple tables to a master table

I'm struggling figuring out how to join multiple tables to a master table with QVDs. 

Master Table: Vendor
Join field: Vendor ID

Left Join Table 1: Invoice
Join Field: Vendor ID

Left Join Table 2: Purchase Order
Join Field: Vendor ID

 

Below is my sample code in Qlik:
I don't think this is correct because technically after the 1st join I'm trying to join the last table on a table that includes joined data already.   

The SQL equivalent of what I want is the following

SELECT A.*, B.*, C.*
FROM VENDOR A
LEFT JOIN PURCHASE_ORDER B ON (A.VENDORID = B.VENDORID)
LEFT JOIN INVOICES C ON (A.VENDORID = C.VENDORID)

 

Sample QlikSense Code 
Vendor:
LOAD inv_vdr_join_key, po_vdr_join_key, *
FROM vendor.qvd
(qvd);

Invoices:
LOAD inv_vdr_join_key, *
FROM Invoices.qvd
(qvd);

PurchaseOrders:
LOAD  po_vdr_join_key, *
FROM PurchaseOrders.qvd
(qvd);

Final_Temp:
LEFT JOIN (Vendor)
LOAD *
Resident Invoices;
Drop Table Invoices;
rename table Vendor to Final_Temp;

Final_Table:
LEFT JOIN (Final_Temp)
Resident PurchaseOrders;
Drop Table PurchaseOrders;
rename table Vendor to Final_Table;

Labels (1)
2 Replies
vinieme12
Champion III
Champion III

Just join immediately

Vendor:
LOAD inv_vdr_join_key, po_vdr_join_key, *
FROM vendor.qvd
(qvd);

Left Join(Vendor)
LOAD inv_vdr_join_key, *
FROM Invoices.qvd
(qvd);

Left Join(Vendor)
LOAD  po_vdr_join_key, *
FROM PurchaseOrders.qvd
(qvd);

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vikasmahajan

Hi

you can also implement this approach :

https://community.qlik.com/t5/Qlik-Sense-Documents/link-table/ta-p/1883375

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.