Dear Alteryx Experts,
I need your help. I'm using a multi-row formula tool to produce 3 different calculations (based on previous row values) from field name A.
Now, using the same calculation, I need to produce exactly the same results for different fields, i.e. "B" and "C".

Is there a way to apply macro on this matter instead of replicating the calculation step for "B" and "C" into separate workflows/steps?
Expected Output is like this.
| ID | Time | A | B | C | A_Prev1 | A_SumPrev2 | A_AvePrev2 | B_Prev1 | B_SumPrev2 | B_AvePrev2 | C_Prev1 | C_SumPrev2 | C_AvePrev2 |
| XYZ | M1 | 12 | 34 | 56 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| XYZ | M2 | 101 | 90 | 78 | 12 | 12 | 6 | 34 | 34 | 17 | 56 | 56 | 28 |
| XYZ | M3 | 123 | 145 | 167 | 101 | 113 | 56.5 | 90 | 124 | 62 | 78 | 134 | 67 |
I'm attaching a dummy file for your reference.
I hope someone has a solution to this.
Thank you.