# MaxNumVal ( TheList )

Evaluates Maximum Numeric Value of a List of VAlues

 Christian Jäger Hannover http://www.hannover.de

Sample input:
1¶45.667¶3.5
Sample output:
45.667

Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Max(1;2;3;6) gets the Max. Pity, FileMaker Inc does not yoet recognizes the "¶" Separator in Functions automatically.
European Users: use comma in the Filter Part

 Vaughan, Sydney, AustraliaJun 6, 2011 Hello Christian, thanks for posting this. I didn't use the custom function, but I used your method in a calculation field. It has worked ver well.
 John Weinshel, Vashon, WA USAJul 7, 2014 Thank you, Christian. Very clean and useful.
 John Davis, HoustonAug 19, 2015 Fails with negative numbers. But simple fix, though. Just simply add a "-" in the Filter characters. Then evaluates properly. Fixed code: Let(x=Substitute(Filter(TheList;"-0123456789.¶");"¶";";"); Evaluate("Max(" & x &")"))
 John Davis, HoustonAug 19, 2015 I used your same calculation method for a minimum values custom function. Easy conversion. Be sure to add the "-" in the Filter characters to fix the incompatibility bug with negative numbers. Find the minimum numeric value from a list of values: MinNumVal ( TheList ) Let(x=Substitute(Filter(TheList;"-0123456789.¶");"¶";";"); Evaluate("Min(" & x &")"))
 John Davis, HoustonAug 19, 2015 The html screwed up the calculation above. Let's try it again: MinNumVal ( TheList ) Let(x=Substitute(Filter(TheList;"-0123456789.¶");"¶";";"); Evaluate("Min(" & x &")")) You get the idea. Just switch out Min for Max and be sure to add a "-" character in the Filter characters to properly evaluate negative numbers.
 Eric SCHMIDT, CISOct 10, 2017 It fails if "TheList" contains only one Value. You need to trap for it

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

# Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: