take filters in account when calculating group sums