Hello! I have the following data with six rows and a header and I am trying to within Alteryx turn it into the second data table with 9 rows + a header. I would like a solution to the following that could work with six rows or six million rows.
For each Year, I want to subtract the Value in Second from the Value in First.
For example, for 2015, FIrst has a value of 10 and Second has a value of 5. I want to subtract 5 from 10 (i.e. 10-5 = 5) and put that in a new row with a Year as 2015, Name as Third, and Value as 5.
Input Data:
Year | Name | Value |
2015 | First | 10 |
2016 | First | 20 |
2017 | First | 30 |
2015 | Second | 5 |
2016 | Second | 5 |
2017 | Second | 5 |
Desired Output:
Year | Name | Value |
2015 | First | 10 |
2016 | First | 20 |
2017 | First | 30 |
2015 | Second | 5 |
2016 | Second | 5 |
2017 | Second | 5 |
2015 | Third | 5 |
2016 | Third | 15 |
2017 | Third | 25 |
Please let me know if you have further questions, and thanks in advance for your help!
Solved! Go to Solution.