Alteryx Designer Desktop Discussions

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

Subtracting values of 2 rows and modifying the second row

Aria_S
7 - Meteor

Hi,

 

I have a simple question. I am trying to subtract 2 rows within the same order and then update the cross-check rows. Below is my input

 

OrdersCategoryValue1Value2Value3Value4
A1234Total Amount1000200030004000
A1235Cross-Check1000200030004000
A5678Total Amount200040090004000
A5679Cross-Check100010090004000
A2314Total Amount300060070004000
A2315Cross-Check300050060004000
A4235Total Amount700010020004000
A4236Cross-Check700010060004000

 

This is what I am trying to achieve,

 

OrdersCategoryValue1Value2Value3Value4
A1234Total Amount1000200030004000
A1235Cross-Check0000
A5678Total Amount200040090004000
A5679Cross-Check100030000
A2314Total Amount300060070004000
A2315Cross-Check010010000
A4235Total Amount700010020004000
A4236Cross-Check00-40000

 

Since there are multiple tiers to this problem, it is getting complicated. Could you suggest a simple way to achieve this?

 

Thankyou,

Aria

4 REPLIES 4
Emil_Kos
17 - Castor
17 - Castor

Hi @Aria_S,

 

Probably there are more efficient ways of doing but it should work for you:

 

Emil_Kos_0-1603809784429.png

the output:

 

Emil_Kos_1-1603809803261.png

 

morr-co
10 - Fireball

Hi @Aria_S - I've attached a sample of how you could accomplish this with a multi-row formula.

Greg_Murray
12 - Quasar

Hi @Aria_S,

 

Here is a dynamic example of how to accomplish this.

Greg_Murray_0-1603809988449.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Aria_S 

 

Here is a workflow for the task.

 

Output:

atcodedog05_0-1603809981856.png

Workflow:

atcodedog05_1-1603809993599.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

Labels