You should use the pivot grid function instead of the regular row. Here is a fiddle demonstrating the use with your example and using the special function summaryType, which implements the calculation for your goal% total.
This is a better way than making the final calculation as a record in the store, you will not encounter the problem of sorting and filtering.
Take a look here for a live example. Basically, you need to add this function to the grid, for example:
Ext.create('Ext.grid.Panel', { ... features: [{ ftype: 'summary' }], ...
And add the summaryType configuration to the desired columns, for example:
columns: [{ dataIndex: 'name', text: 'Name', summaryType: 'sum', ...
And here's what a custom summaryType looks like:
dataIndex: 'targetPercent', text: 'Target%', summaryType: function(records){ var totals = records.reduce(function(sums, record){ return [sums[0] + record.data.target2, sums[1] + record.data.targetDiff]; }, [0,0]); return (totals[0] * totals[1]) / 100; }
source share