How it works...

For the AllSum measure, we use SUMX coupled with an ALL filter to sum the Value column for all rows in the R04_Table table, regardless of any filters. The NormalSum measure simply implements the SUM function for the Value column in the R04_Table table.

For the InverseSum measure, we start by checking whether the Category column in the R04_Table table is filtered using the ISFILTERED function. If the Category column is not filtered, we simply use the same DAX we used in the NormalSum measure. If the Category column in the R04_Table table is filtered, then we need to calculate the sum of the Value column for the rows that are not selected in the slicer. To do this, we use CALCULATE to SUM the Value column with a filter that returns non-matching rows from the R04_Table table. 

To return non-matching rows, we use the EXCEPT function. For the first parameter of the EXCEPT function, we use the ALL function to return all values from the Category column in the R04_Table table. For the second parameter of the EXCEPT function, we use VALUES to return distinct, filtered values from the Category column (the items chosen in the slicer). Thus, the end result of the EXCEPT function is a table that contains only non-matching rows from the R04_Table table. CALCULATE applies this filter to the calculation of our SUM of the Value column.