It seems to be calculating that way because that is what you have asked it to so...
sum ( work out the max counter per slot ) - sum ( work out the min counter per slot )
when you want to ask
sum ( per slot; max counter - min counter)
try creating a calculated member like
with member [Measures].[CounterDiff] as
([Measures].[MaxCounter] - [Measures].[MinCounter])
and then using that in
sum([Slot].[Code].children, [Measures].[CounterDiff])