Alteryx Designer Desktop Discussions

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

Looping or Multiple Rows

CKyrle
5 - Atom

Hi guys, 

 

I am very new to Alteryx (in fact, I started yesterday) and I am running into a challenge for which I would be very glad to receive help. 

In my data below, I need to iterate (loop?) through every cluster and identify to which degree I can meet the required amount of cluster articles. For each cluster there is a varrying number of corresponding material IDs in stock. I want to meet the demand (required amount) via waterfall principle, assigning the available amount of material IDs from top to bottom, progressing to the next row as soon as the available amount of the material ID is expired, and also progressing to the next cluster as soon as the demand is met or the available amount is expired. 

 

 

Current table:

ClusterMaterial IDRequired Amount of Cluster by CustomerAvailable Amount of Material ID in Storage
AAAAAA11111110060
AAAAAA22222210030
AAAAAA33333310010
AAAAAA33333310010
BBBBBB999999200

400

BBBBBB888888200

100

CCCCC55555550

0

 

Desired table:

ClusterMaterial IDRequired Amount of ClusterAvailable Amount of Material ID in StoragePackaged Amount of Material IDRemaining Amount of Material ID in Storage
AAAAAA11111110060600
AAAAAA22222210030300
AAAAAA33333310010100
AAAAAA33333310010010
BBBBBB999999200

400

200

200

BBBBBB888888200

100

0

100

CCCCC55555550

0

0

0

 

Of course I also want to address special cases like empty stock etc in a later point. 

I thought about using the multiple rows formula, but it doesnt really seem to be flexible or dynamic enough. 

 

Thank you very much in advance!!!

Best

 

1 REPLY 1
mceleavey
17 - Castor
17 - Castor

Hi @CKyrle ,

 

Try the attached workflow, that should get you where you need to be.

 

mceleavey_0-1602798680528.png

Hope this helps,

 

M.



Bulien

Labels