Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Multi-Row Subtraction

KmbrlyPC
8 - Asteroid

What multi-row formula can I use to subtract every other row from the one before it? The result column is what I need. For example, Value 8-6=2, Value 4-3=1, Value 2-6=-4

 

SetValueResult
1.26 
1.682
1.23 
1.641
1.26 
1.62-4
1.26 
1.682
1.23 
1.652
1.27 
1.64-3
6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @KmbrlyPC 

 

Your multi-row formula tool formula would be like below.

 

Workflow:

atcodedog05_0-1634229709217.png

 

Hope this helps : )

DawnDuong
13 - Pulsar
13 - Pulsar

hi @KmbrlyPC 

The Multi-Row formula tool is what you need. If you have not used this one before, you can rightclick on the Multi-Row tool to open the example workflow and learn the various settings from there.

MultiRowFormulaTool.PNG

 

Check out the full Help documentation at: https://help.alteryx.com/20213/designer/multi-row-formula-tool

Dawn.

KmbrlyPC
8 - Asteroid

Unfortunately, it is not working. All it's doing is repeating the value in the active row. So for example, on Row 2 instead of the Result being "2" it is showing up as an "8". I used the formula exactly.

DawnDuong
13 - Pulsar
13 - Pulsar

hi @KmbrlyPC 

Not sure why you have that error. My workflow runs perfectly though. Perhaps you can check if your datatype is correctly set - if not some logic test (e.g. 😃 may fails.

Attached the workflow here.

Kim.PNG

KmbrlyPC
8 - Asteroid

Thanks. The workflows did work after I unchecked the Group By! It seems that was causing it to not work initially.

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @KmbrlyPC 

Cheers and have a nice day!

Labels