A Running total is a sequence of values that equate to partial sums from a set of data.
For example, you have an array of numbers you want to add together, but want the total of the current number + all the numbers before as you're iterating through your array.
You'll most likely need to collect your data and perform this inside a JS transformer before returning it into your table column:
let my_array = [1, 2, 3, 4]
let starting_number = 10
let temp_num = starting_number
let final = my_array.map(value => temp_num += value)
//iterating through your array: temp_num = 10, value = 1
//starting: 10 + 1 = 11
//next: 11(taken from the previous) + 2 = 13
//next: 13(taken from the previous) + 3 = 16
//next: 116(taken from the previous) + 4 = 20
return final // [11, 13, 16, 20]
Inserting your data into your table:
- Select your column
- Insert your transformer name into the Value of your column
- Reference your array-index by using the magic variable i