Transaction groups partial accumulate value

Hello everyone.

In my project we need to historicizing an energy value. This value is increasing over time:

Example

value 1: 10000

One hour later

value 2: 10350

We want to record this partial value, 350, in our database. And keep doing every hour.

¿How can we do that with the Transaction Groups?