def filter(self, filterType, groupedData):

        filteredData = {}
        if filterType == "Sum":
            for (key, valueList) in groupedData.items():
                sum = 0
                for value in valueList:
                    try:
                        sum += self.castRawAnswer(None, value)
                    except:
                        pass
                filteredData[key] = sum
            return filteredData
        return groupedData

# =============================================================================
@todo: docstring
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/S3NumericAnalysis.filter