We are all familiar with normal aggregations, such as sum, average, maximum, minimum, and count. Usually, this is exactly what we want when analyzing data: displaying aggregated data based upon filtering that we specify. However, sometimes the desired behavior lies in seeing the aggregation of values for the items that we do not filter. In other words, we wish to instead specify the items that we do not want included in an aggregation as opposed to the items we do want included in an aggregation.
This recipe demonstrates how to implement a measure that performs an inverse sum; in other words, it sums the items that we have not selected. While this recipe performs a sum aggregation, this same technique can be used for any type of aggregation.