Good evening!
I'm on a project where I translate a test from another language to Alteryx.
The problem consists of a block of code that was processed line by line in the table, where I update a series of variables (3) based on values from the current and/or previous line, calculations are performed and the results are arranged in 3 columns (image below columns from 09 to 10).
See the example below:
Follow with the explanation based on the image:
Column 10 is changed when column 5 equals “E” and column “4” is “S”.
When both conditions are true, column 10 and 11 are updated using the following rules:
Reinforcing that the calculation has to be done line by line, as there will be cases where the calculation of a line depends on the processing results of the previous line.
Is it possible to do this within Alteryx?
Definitely 🙂 use the Multi-Row Formula tool.
Yes, you can. Normally, you can use Multi-Row formula tool to calculate the multi row value.
But Multi-Row Formula tool can not update more than 2 fields by using one Multi-Row Formula tool.
In this case, you have to use iterative macro. The sample macro is as following.
I attached the sample workflow. Please check it and if you have any questions, let me know.