This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
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.
Final inventory <= accumulated consumo in nrows() then the logic is explained in the attached excel file.
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.
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: