ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: EPM Solutions on February 11, 2020, 05:22:19 pm
-
Hello Team,
Requirement:
Exclude the records where Applicable column has No value from an avg(Custom row summary);
Can you please provide an example to calculate custom row summary for above requirement?
We have added an snippet in below URL;
Problem URL:
http://next.plnkr.co/edit/nCDCvzvt7eihojGl
-
Please check this solution: https://stackblitz.com/edit/custom-aggregates
var agg = pq.aggregate;
agg.avgCustom = function(arr, col, rows) {
var vals = arr.filter(function(val, i){
return (rows[i].applicable || "").toUpperCase() != "NO"
})
return agg.avg(vals, col)
};