3 Replies Latest reply on Sep 3, 2015 11:44 PM by Markus Schneider

# Finding Median or middle value of three fields in the same table.

Must admit, this platform is tricky. Use to web programming but stuck on something I thought would be very easy. I have three fields in one table with length x width x height each separate fields. I need to get the median or middle value. I am lost on how to do this. So if Length = 5, Width = 20, height = 12. I would need to create a calculation showing height is the middle / median value of the three. Any help, thanks for your time and effort.

• ###### 1. Re: Finding Median or middle value of three fields in the same table.

You have only 3, then

Length + Width + height - Min ( Length ; Width ; height ) - Max ( Length ; Width ; height )

But this show value 12, not field name height

1 of 1 people found this helpful
• ###### 2. Re: Finding Median or middle value of three fields in the same table.

Thanks, it was simple. So obvious. Appreciate the quick reply and response.

• ###### 3. Re: Finding Median or middle value of three fields in the same table.

there are tons of custom functions available (FileMaker Pro Advanced needed), ie on briandunning.com:

FileMaker Custom Function:Median ( valueList )

this function needs the list of values to be sorted - there are also custom functions available that will do that (-:

If there are always 3 fields in one table, You can use one of the sorting cf's, something like this:

sortList(YourListOfThree_DelimitedByFileMakerCarriageReturn; options) -> then pick the second value

(although the formula is more elegant)