# Database Discussions > MDX and Analysis Services >  MDX Sum of Min on a set without using the set in the selec

## squilibrium

I have this situation:

Slot (dimension) 
Customer(Dimension) 
MinCounter(measure with MIN aggregation) 
MaxCounter(measure with MAX aggregation)

I'd like to create a calculated member that is a Delta of counters (MaxCounter - MinCounter) i used a simple formula:

[Measures].[MaxCounter] - [Measures].[MinCounter]

Obv it works when i use Slot dimension, because counters are relative to slot.

But I'd like to have the delta for every customer. 
Every customer have N slot It means that to calculate delta i need to calculate delta for every slot of a customer and SUM all of them to have the delta of the customer. So i tried:

(SUM(([Slot].[Code].children, [Measures].[MaxCounter])) - SUM(([Slot].[Code].children, [Measures].[MinCounter])))

But it doesn't work

When i try to make a pivot with customer as dimension and Delta like measure, i obtain wronr result. Delta it seems calculated like :

max counter between ALL THE SLOT of the customer -

min counter between ALL THE SLOT of the customer

Can someone help me?

Thanks Andrea

----------

