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: 
Anonymous
Not applicable

Order and Delivery date comparison

Hi, I would want to understand the relationship between customer_order_date and delivery_made_date, since data are in different sources so I have now concatenate them into below table structure:

Sales_Order_IDSales_Order_DateDelivery_IDDelivery_DateRegionProductCustomerSO_ValueDN_Value
10000120181201  ABCEFGXYZ100 
100001 80000120181207ABCEFGXYZ 80
100001 80000220181208ABCEFGXYZ 20

 

My questions is i want to calculate the delivery date minus sales order date so that I would know the lead-time by different product / region / customer and whether it's impact by the SO_Value as well.

Please help and suggest how I can do it. Many thanks in advance for the help.

Regards,

Jacob

3 Replies
laksyelugoti
Contributor II
Contributor II

You may first want to repeat Sales_Order_Date for the rows or create a new field using LEFT JOIN like below which will give you a new column "Sales_Order_Date_NEW"

 

left join(Table1)

LOAD Sales_Order_ID

Sales_Order_Date as Sales_Order_Date_NEW

Resident Table1.

DROP FIELD Sales_Order_Date ;

 

you will have OUTPUT like this.

Sales_Order_IDSales_Order_Date_NEWDelivery_IDDelivery_DateRegionProductCustomerSO_ValueDN_Value
10000120181201  ABCEFGXYZ100 
100001 2018120180000120181207ABCEFGXYZ 80
100001 2018120180000220181208ABCEFGXYZ 20
Anonymous
Not applicable
Author

Thanks, it should be a good start, but then some order might have multiple delivery, that's why not sure how I can do it if I want to focus on the latest delivery date and also count the number of delivery for each order.
Vegar
MVP
MVP

If you adjust @laksyelugoti script like this

left join(Table1)
LOAD Sales_Order_ID
Max(Sales_Order_Date) as Last_Sales_Order_Date
Resident Table1
GROUP BY Sales_Order_ID;

You will get the last sales order date for all deliveries. To count deliveries per sales order you simply use count(Delivery_ID) or count(distinct Delivery_ID) as your chart expression.