I have a customized aggregate function that calculates weighted means over two columns
I need to add exceptions to this weighted means calculation.
There are some very large values in my database that skew off my mean.
I want to show these values in the grid but exclude them from the aggregate calculation.
I tried to splice the data.subItems
array of objects, but that removes the object and does not display it in the grid.
How can I do this. My code for the calculation is as follows
var sumMarketVal=this.getcolumnaggregateddata('MarketVal', ['sum'], true, data.subItems);
var sumPa=this.getcolumnaggregateddata('Prod1', ['sum'], true, data.subItems);
var sumMarketValStringified=parseFloat(sumMarketVal.sum.replace(/,/g, ''));
console.log("typeof(sumPa):"+typeof(sumPa.sum)+"typeof(sumMarketValStringified):"+typeof(sumMarketValStringified));
weightedMean=sumPa.sum/sumMarketValStringified;
console.log("weightedMean"+weightedMean);
Let me know if you need more of my code for reference
Thank You