6 Replies Latest reply: Oct 29, 2014 4:23 PM by Jonathan Poole

# Calculating average after removing min and max

I am trying to find a clean way to calculate average in a pivot chart after removing the min and max values of each row.  Does anyone have any suggestions?

An expression like:

( sum(value) - max(value) - min(value) ) / (count(value)-2)

• ###### Re: Calculating average after removing min and max

What's wrong with your expression? Alternatively, you can also use set analysis.

• ###### Re: Calculating average after removing min and max

Yes, the expression does seem to be working - it's just not getting the value I would expect.  Could you demonstrate the set analysis way?

• ###### Re: Calculating average after removing min and max

I would first investigate why your expression is not working as of now - set analysis would do nothing else than translating your expression into a set modifier.

• ###### Re: Calculating average after removing min and max

Which part is incorrect ?  The denominator , numerator or both ?  I would split apart the components and test each one. There is really only 3 or 4 values that need validating.

• ###### Re: Calculating average after removing min and max

yah it's working fine, now ended up being a bracket misplacement

• ###### Re: Calculating average after removing min and max

cool... mark your last response as correct and close er' down.