Hey Mengel,
Your formula is the array of the column itself, pq_fn: {revenues:'sum(C:C)', profits:'sum(D:D)', diff:'sum(E:E)'
Had a similar issue the other day, resolved it using a javascript formula, looking at what your trying to do.
https://plnkr.co/edit/2P5W0d3zHfm2ytI9PL0C?p=previewAfter reviewing with ParamQuery, we ended up using formulas to control the summation.
function calculateSummary() {
if your trying to get the summary of your data pulled in you could use the following:
grid = pq.grid("#grid_summary");
var data = grid.options.dataModel.data;
if (data.length > 0)
{
var totalSumProfit = 0;
var totalSumRevenue = 0;
for (var i = 0, len = data.length; i < len; i++) {
var rowData = data
;
totalSumProfit += parseFloat(rowData["profits"]);
totalSumRevenue += parseFloat(rowData["revenues"]);
}
alert(totalSumProfit);
alert(totalSumRevenue);
}
}