```
CATEGORY  SUBCATEGORY   VALUES   %CHANGE?
   A           1          1
   A           2         10         900
   C           1          8
   C           2          16        100
   C           3          8        -50

```

So far, I only have category, subcategory, and values columns.
I want to add a column containing the percent change between each row's `VALUES` value and the one in the row above it. This should not be calculated when the row above belongs to a different category. Following the table above, `1` to `10` is a 900% increase, then the change from `10` to `8` is not calculated because the category switches from `A` to `C`, then `8` to `16` is a 100% increase, and so on.

I don't know whether to use R, Python, Teradata SQL, or Excel. How do I do this?