# MaxNumVal ( TheList )

Evaluates Maximum Numeric Value of a List of VAlues

Average rating: 4.3 (39 votes) Log in to vote

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

## Comments

Vaughan, Sydney, Australia Jun 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 USA Jul 7, 2014 |
||

Thank you, Christian. Very clean and useful. | ||

John Davis, Houston Aug 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, Houston Aug 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, Houston Aug 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, Bourg - France Oct 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.