Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, as a newcomer to Qlik Sense, I'm in need of some assistance with joining tables. Specifically, I'm attempting to join three tables (Work Orders, Work OrderLines, and Parts Orders) into one, but the output only shows the content of the first table. (Final_Temp_1) Can you help me with this issue?
Final_Temp_1:
Load
Work_Order_Name as WONumber,
Work_Order_Type as WOType,
Work_Order_Installed_Product_Item_Number as WOItemNumber,
Work_Order_Id_Key as WOKey,
FROM [lib://Work_Order.qvd]
(qvd);
left Join (Final_Temp_1)
Load
Work_OL_Name as WOLineNumber,
date(floor(Work_OL_Created_Date)) as WOLCreatedDate,
Work_OL_Line_Type as WOLineType,
Work_OL_Item_Number as WOLItemNumber,
Work_OL_Line_Status as WOLineStatus,
Work_OL_Actual_Quantity as WOLQuantity,
Work_Order_Id_Key as WOKey
FROM [lib://Work_Order_Line.qvd]
(qvd);
Final_Temp_2:
Load
Work_Order_Name as WONumber,
Work_Order_Type as WOType,
Work_Order_Installed_Product_Item_Number as WOItemNumber,
Work_Order_Id_Key as WOKey
FROM [lib://Work_Order.qvd]
(qvd);
left join (Final_Temp_2)
Load
Parts_Order_Name as PartsOrderNumber,
date(floor(Parts_Order_CreatedDate)) as PartsOrderCreatedDate,
text(trim(Parts_Order_Movex_ID__c)) as SystemID,
Parts_Order_Case_Number__c as PartsOrderCaseNumber,
Parts_Order_SVMXC__Number_of_units_returned__c as PartsOrderQuantity,
Parts_Order_Country_CSCD__c as PartsOrderCountry,
text(Parts_Order_SVMXC__Service_Order__c) as WOKey
FROM [lib://artsOrders.qvd]
(qvd);
Final:
NoConcatenate
LOAD *
Resident Final_Temp_1;
Concatenate (Final)
LOAD *
Resident Final_Temp_2;
DROP Tables Final_Temp_1, Final_Temp_2 ;
@KGosha not sure why you need temp table 2 and why you need to concatenate ? It seems Work_Order_Line is your Fact table and other two are dimension table so you can simply join both dimension table to Fact table. Note that first you need to load Fact table then join dimension table
WOL:
LOAD Work_OL_Name as WOLineNumber,
date(floor(Work_OL_Created_Date)) as WOLCreatedDate,
Work_OL_Line_Type as WOLineType,
Work_OL_Item_Number as WOLItemNumber,
Work_OL_Line_Status as WOLineStatus,
Work_OL_Actual_Quantity as WOLQuantity,
Work_Order_Id_Key as WOKey
FROM [lib://Work_Order_Line.qvd]
(qvd);
left join(WOL)
Load
Work_Order_Name as WONumber,
Work_Order_Type as WOType,
Work_Order_Installed_Product_Item_Number as WOItemNumber,
Work_Order_Id_Key as WOKey
FROM [lib://Work_Order.qvd]
(qvd);
left join (WOL)
Load
Parts_Order_Name as PartsOrderNumber,
date(floor(Parts_Order_CreatedDate)) as PartsOrderCreatedDate,
text(trim(Parts_Order_Movex_ID__c)) as SystemID,
Parts_Order_Case_Number__c as PartsOrderCaseNumber,
Parts_Order_SVMXC__Number_of_units_returned__c as PartsOrderQuantity,
Parts_Order_Country_CSCD__c as PartsOrderCountry,
text(Parts_Order_SVMXC__Service_Order__c) as WOKey
FROM [lib://artsOrders.qvd]
(qvd);
Hello,
Thank you for the quick reply.
I followed your suggestions, but I'm still getting no data on the parts order information.
When I created the relationships between the tables it appeared to be the same format. The below is from the data model viewer.
Work Order Table
Work Orderline Table:
Please advise if you require additional information.
Unfortunately, I am unable to share the file with you. However, I can assure you that all of the fields have a density of over 90%. Would you like any additional information, or should I create a mock table resembling the information loaded?
This will definitely help with troubleshooting.
@KGosha not sure why you need temp table 2 and why you need to concatenate ? It seems Work_Order_Line is your Fact table and other two are dimension table so you can simply join both dimension table to Fact table. Note that first you need to load Fact table then join dimension table
WOL:
LOAD Work_OL_Name as WOLineNumber,
date(floor(Work_OL_Created_Date)) as WOLCreatedDate,
Work_OL_Line_Type as WOLineType,
Work_OL_Item_Number as WOLItemNumber,
Work_OL_Line_Status as WOLineStatus,
Work_OL_Actual_Quantity as WOLQuantity,
Work_Order_Id_Key as WOKey
FROM [lib://Work_Order_Line.qvd]
(qvd);
left join(WOL)
Load
Work_Order_Name as WONumber,
Work_Order_Type as WOType,
Work_Order_Installed_Product_Item_Number as WOItemNumber,
Work_Order_Id_Key as WOKey
FROM [lib://Work_Order.qvd]
(qvd);
left join (WOL)
Load
Parts_Order_Name as PartsOrderNumber,
date(floor(Parts_Order_CreatedDate)) as PartsOrderCreatedDate,
text(trim(Parts_Order_Movex_ID__c)) as SystemID,
Parts_Order_Case_Number__c as PartsOrderCaseNumber,
Parts_Order_SVMXC__Number_of_units_returned__c as PartsOrderQuantity,
Parts_Order_Country_CSCD__c as PartsOrderCountry,
text(Parts_Order_SVMXC__Service_Order__c) as WOKey
FROM [lib://artsOrders.qvd]
(qvd);
@Kushal_Chawda This functions flawlessly. I appreciate your assistance. Thank you!
Thank you for assisting. It has now been resolved.