[GH #4646] Average summary column gives incorrect results

Tags: #<Tag:0x00007efc7288b4c0> #<Tag:0x00007efc7288b2b8>

Average summary column NAN when all values set to 0 or blank cell. Instead of NAN shouldn’t this be 0 or blank and not ERROR. Also if you enter 1 in one average cell and set the rest to zero. the average comes out at 1 and not 0.2 for example.

in the example below modify the E column to all zeros to get NAN. Then change one cell in E to 1 or 23 etc to get the wrong average result. In fact any blank or zero column is ignored in the average calculation

ie

10 10 10 10 0

should be 8 as 5 cells but results at 10

http://jsfiddle.net/jws0L4Lq/

Hi Ben,

I think that the result of 0 would be better than NaN. I know that it’s there as we are trying to add empty strings but we can add an exception to return 0 in cases like that.

I have added the issue at https://github.com/handsontable/handsontable/issues/4646
Please track changes to https://github.com/handsontable/handsontable/issues/4646 for updates.

Thank you, more than one issue with zeros.

You’re welcome @ben.warren