I'm sure this is very simple but I cannot find it...
"footerCallback": function( tfoot, data, start, end, display ) {
var api = this.api();
var theColumnTotal = api
.column( 4 )
.data()
.reduce( function (a, b) {
if(isNaN(a)){
return '';
} else {
a = parseFloat(a);
}
if(isNaN(b)){
return '';
} else {
b = parseFloat(b);
}
return (a + b).toFixed(2);
}, 0 );
// Update footer
$( api.column( 4 ).footer() ).html(
theColumnTotal / [NEED ROW COUNT HERE]
);
}
Let me know if there is any further info needed, thanks!