I need help with calculating the % difference for the years for all groups.
But the calculation should be restricted to a single group. How can I achieve this via Alteryx
Calculation ([Value]-[Row+1:Value])/-[Row+1:Value]
Groups | year | Value | Calculation |
A | 2020 | 2 | -0.33333 |
A | 2019 | 3 | -0.25 |
A | 2018 | 4 | -0.2 |
A | 2017 | 5 | |
B | 2020 | 3 | -0.25 |
B | 2019 | 4 | -0.33333 |
B | 2018 | 6 | -0.14286 |
B | 2017 | 7 | |
C | 2020 | 9 | 1.25 |
C | 2019 | 4 | -0.2 |
C | 2018 | 5 | -0.16667 |
C | 2017 | 6 |
Solved! Go to Solution.
Hi @Manjari ,
To make the calculation to restart on every group, what you have to do is group by the Group column in the multi-row tool configuration window.
Then you can use the expression you provided.
Regards,
Angelos
Thank you @AngelosPachis worked like a charm.