How to  create a formula to calculate like avg,sum,min,max in handsontable