fixed summary stats to calculate the right range of totals from filtered data