Alteryx Designer Desktop Discussions

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

Allocate negative amounts to same product row problem

gjunhao96
8 - Asteroid

Hi all,

 

Suppose i have a dataset as such: 

gjunhao96_1-1663576923280.png

 

 

What I want to do is for each row with a negative amount, I want to add that amount to a row of the same product with a positive amount, and identify any negative amount that has been unallocated. The output could be something like this:

gjunhao96_2-1663577081015.png

 

How could I achieve this? Initially, i thought that a multi row formula tool might work, but seems like i have to both look at above and below rows. Attached is a starter workflow file.

2 REPLIES 2
Emmanuel_G
13 - Pulsar

Hi @gjunhao96 ,

 

Find attached the way of doing this.

 

Please do not hesitate to mark this answer as solution if it helped.

 

Emmanuel_G_0-1663578460160.png

 

FrederikE
13 - Pulsar

Hey @gjunhao96,

 

See the attached WF

 

FrederikE_1-1663578592748.png

 

Labels