Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here

Loop workflow for Inbound Logistic Project

Highlighted
Alteryx Certified Partner

Hi guys, 

 

I'm running in some trouble. I was looking for information about loops in Alteryx but didn't have luck with the logic I want to translate.

 

First, I have a material that is produced in some plant and has a type of material and unit range also I know the final inventory of the material by week so the problem starts when I want to found the days of inventory on hands (DIOH) which is calculated as the number of weeks a material is stored in the plant. There are two possible solutions.

 

Case 1: 

Final inventory <= accumulated consumo in nrows() then the logic is explained in the attached excel file.

 

Case 2:

Final inventory is 0 so DIOH=0 or final inventory not reached the accumulated consumo so is would be like the number of rows in the file*7 days.

 

The problem is that the logic I have made is for 25 rows after the current and there are some cases that surpass this limit like 40 rows accumulated, so there is a way to make it more intuitive like an iteration from i=1 to row=n, please.

 

Thanks!

Highlighted
11 - Bolide

Hi there, 

 

It sounds like you already have some logic in place and you just need to add looping, is that right? In Alteryx, a batch macro can be use like a for loop, and and iterative macro can be used like a while loop. I suggest you look into these and try to set it up:

 

https://help.alteryx.com/2018.2/IterativeMacro.htm

https://help.alteryx.com/9.5/BatchMacro.htm

 

If you get stuck trying to implement one of these, it would be helpful if you could attach your workflow here.

 

One other option, if you happen to know R, is that you can use the R tool in Alteryx to loop through some data.

 

Best of luck!

Megan

Labels