Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Matching the initial schedule date with an order

MWarner
5 - Atom

Hello,

 

I am currently trying to develop a WF that calculates actual lead times of orders (time it takes for an order to be placed, shipped and arrive to its needed location). Then I need to calculate metrics based on the actual lead time vs the estimated time the suppliers said the order would take.

 

Orders can be one or many rows. Each week, the quantities of orders are updated, if there is a change, it indicates some of the order has shipped.

 

Example data: 

WeekOrderQTYScheduled_Ship_Date
1A10Date1
1A10Date2
1B5Date1
2A5Date1
2A10Date2
2B5Date1

This indicates that 5 have shipped from Order A between week 1 and 2.

 

I have been able to calculate the amounts that ship week by week. What I need to do next is calculate metrics. One of the metrics involves calculating the number of days between the initial scheduled shipment date and when the order shipped. The issue is that the scheduled ship date can change from one week to a next. Additionally, order lines can be broken apart from one week to the next, so an order that is initially 1 row of QTY 10 can be 2 rows of QTY 5 and 5 the next week. 

 

What I've done is taken an initial "snapshot" of all new orders with their original shipment dates. I'd like to compare and correctly append that snapshot to the orders that have shipped.

 

Ex:

 

Snapshot

WeekOrderQTYScheduled_Ship_Date
1A10Date1
1B50Date2

 

 

Shipment record

WeekOrderQTYQTY_SHIPPEDScheduled_Ship_Date
1A55Date1
1B500Date2
2A30Date1 
2A20Date3
2B455Date4

Order A was split into two lines between weeks 1 and 2, and a new shipment date for one line was changed.

 

What id like to create is something like the following:

 

WeekOrderQTYQTY_SHIPPEDScheduled_Ship_DateInitial_Schdule_Ship_Date
1A55Date1Date1
1B500Date2Date2
2A30Date1 Date1
2A20Date3Date1
2B455Date4Date2

 

How could I go about doing this? These tables are simplified versions of the data that I'm using but I can provide more clarification if needed. Thank you.

1 REPLY 1
geraldo
13 - Pulsar

@MWarner 

 

I tried to understand the steps you put and the examples but I couldn't understand.
if it could improve the need.

Labels