Wednesday, August 27, 2014

Claculating difference between the rows...

Hi guys, one question: having a situation like


A A1 10


A A2 15


A A3 10


B B1 7


B B2 11


How can I have something like


A A1 10 0


A A2 15 5


A A3 10 -5


B B1 7 0


B B2 11 4


The fourth column should be the difference between the actual row and the previous row but only if belong the same class (first row). Is it something easy? I was wondering some strange join...



No comments:

Post a Comment