Hi all - I have another confusing (for me) scenario here - I can't figure it out with the wonderful Alteryx tools
Basically what I am trying to do is subtract the QTY on the PACKAGE ID line from (and in order) PAST, TODAY, TOMORROW, FUTURE until that is 0 and move onto the next line until I run out of package line and QTY or until the PAST/TODAY/TOMORROW/FUTURE numbers have been populated
TODAY/FUTURE/TOMORROW/PAST is the total orders for (they are repeating so the values on the first line are what is ordered and the rest should be 0 0 - hadn't figured that out yet) - so the total order for scenario 1 for FUTURE for example is 30 and not 90
See below examples
Data now | ||||||||||
PACKAGE ID | PACKAGE LINE | SKU | QTY | TODAY | FUTURE | TOMORROW | PAST | |||
39584358 | 3 | 9092058510000 | 41 | 5 | 30 | 1 | 27 | |||
39584358 | 4 | 9092058510000 | 36 | 5 | 30 | 1 | 27 | |||
39584358 | 5 | 9092058510000 | 40 | 5 | 30 | 1 | 27 | |||
What I am trying to get to example 1 | ||||||||||
PACKAGE ID | PACKAGE LINE | SKU | QTY | TODAY | FUTURE | TOMORROW | PAST | |||
39584358 | 3 | 9092058510000 | 0 | 5 | 8 | 1 | 27 | |||
39584358 | 4 | 9092058510000 | 14 | 0 | 22 | 0 | 0 | |||
39584358 | 5 | 9092058510000 | 40 | 0 | 0 | 0 | 0 | |||
Data now | ||||||||||
PACKAGE ID | PACKAGE LINE | SKU | QTY | TODAY | FUTURE | TOMORROW | PAST | |||
39584358 | 3 | 9092058510000 | 41 | 15 | 60 | 40 | 50 | |||
39584358 | 4 | 9092058510000 | 36 | 15 | 60 | 40 | 50 | |||
39584358 | 5 | 9092058510000 | 40 | 15 | 60 | 40 | 50 | |||
What I am traying to get to example 2 (where total of future, today, past, tomorrow is greater than available qty on a package) | ||||||||||
PACKAGE ID | PACKAGE LINE | SKU | QTY | TODAY | FUTURE | TOMORROW | PAST | |||
39584358 | 3 | 9092058510000 | 0 | 0 | 0 | 0 | 41 | |||
39584358 | 4 | 9092058510000 | 0 | 15 | 0 | 12 | 9 | |||
39584358 | 5 | 9092058510000 | 0 | 0 | 12 | 28 | 0 |
Thanks in advance!
Hi @jdallen
Here is a nudge in the right direction. I'll have to expand it for QTY spilling over to multiple Package lines, but feel free to have a play with it in the meantime