handlebars-helpers
handlebars-helpers copied to clipboard
An examples of working out averages on columns
HI, is there anyway to do this out of of the box, please?
Let's say we have a the following data as a set of rows:
[
{ Jan:1, Feb:2, Mar:3, Apr: 4, May: 5},
{ Jan:2, Feb:4, Mar:4, Apr: 9, May: 5},]
We'd like to work out the avegrate on the "columns" eg field "Jan", avg = 1 + 2/2 = 1.5
Is there a way to do this. I see "average" but not sure if there's a way to split into columns and store temporarily without writing a customer JS help?