I have a table that has structure like: Year, Month, ValueA, ValueB, ValueC, etc.. I want to group the table by Year and Month, but aggregate based on the difference in column values.
Year Month ValueA ValueB ValueC
2016 1 40 53 49
2017 2 29 31 26
2016 1 25 20 31
2017 2 22 30 29
I want to output a table that looks like:
Year Month ValueA ValueB ValueC
2016 1 15 33 18
2017 2 7 1 3
How would I go about this? Any help is much appreciated.