Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

Subtract a quantity until the line is complete or quantity is 0

jdallen
5 - Atom

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 IDPACKAGE LINESKUQTYTODAYFUTURETOMORROWPAST   
395843583909205851000041530127   
395843584909205851000036530127   
395843585909205851000040530127   
What I am trying to get to example 1        
PACKAGE IDPACKAGE LINESKUQTYTODAYFUTURETOMORROWPAST   
3958435839092058510000058127   
39584358490920585100001402200   
3958435859092058510000400000   
           
           
Data now          
PACKAGE IDPACKAGE LINESKUQTYTODAYFUTURETOMORROWPAST   
39584358390920585100004115604050   
39584358490920585100003615604050   
39584358590920585100004015604050   
           
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 IDPACKAGE LINESKUQTYTODAYFUTURETOMORROWPAST   
3958435839092058510000000041   
39584358490920585100000150129   
39584358590920585100000012280   

 

Thanks in advance!

 

 

1 REPLY 1
DavidP
17 - Castor
17 - Castor

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

 

DavidP_0-1640046033626.png

 

Labels
Top Solution Authors