Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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);
Hi
you can also implement this approach :
https://community.qlik.com/t5/Qlik-Sense-Documents/link-table/ta-p/1883375
Vikas