I have a FileMaker database where I want to calculate the median value of 3 different fields. I used the code that can be found here.
In my setup, it looks like this:
Let ([ beak.trait = List (beak_depthA; beak_depthB; beak_depthC); valuelist = SortValues ( beak.trait; 1); count = WordCount ( valueList ); odd = MiddleValues ( valueList ; Truncate (count/2;0) +1 ; 1 ); even = MiddleValues ( valueList ; Truncate (count/2;0) ; 1 )]; Case( Mod ( count ; 2 ) ; odd ; (even+ odd) / 2))
Would there be a way to get the value, when the number of fields is odd without the extra return?
How the code would be affected?