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
Set | Value | Result |
1.2 | 6 | |
1.6 | 8 | 2 |
1.2 | 3 | |
1.6 | 4 | 1 |
1.2 | 6 | |
1.6 | 2 | -4 |
1.2 | 6 | |
1.6 | 8 | 2 |
1.2 | 3 | |
1.6 | 5 | 2 |
1.2 | 7 | |
1.6 | 4 | -3 |
Solved! Go to Solution.
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.
Check out the full Help documentation at: https://help.alteryx.com/20213/designer/multi-row-formula-tool
Dawn.
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.
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.
Thanks. The workflows did work after I unchecked the Group By! It seems that was causing it to not work initially.
Happy to help : ) @KmbrlyPC
Cheers and have a nice day!