Please keep in mind that Set Analysis cannot be sensitive to the values of a chart Dimension, because Set Analysis conditions are being applied before the chart is calculated.
However, the sum() in a chart will already calculate the measure for the values of your dimensions. You don't need to add this condition again. Or, are you trying to calculate a total by Category? Then, use the prefix TOTAL, like this:
sum(TOTAL <Category> Value)
when Category is one of your chart dimensions.
Learn advanced QlikView and Qlik Sense techniques in my book QlikView Your Business