In This Topic
Syntax
MAX(arg1 [; ByEveryN])
Arguments
The 'arg1' parameter must be an array.
ByEveryN is an optional argument - an integer constant, greater or equal to 1.
Result
Returns the max value of the elements in the array 'arg1'.
If ByEveryN is supplied, then the function calculates the maximum for each group of N successive elements and the result is an array.
Description
Calculates the max value of all the elements in the input array, or the max value of every N successive elements in the input array.
Example 1:
Expression: MAX( arg1 )
Result: 11
Example 2:
(max by every 2 elements)
Expression: MAX( arg1; 2 )
arg1 |
11 |
7 |
3 |
5 |
6 |
1 |
result |
11 |
5 |
6 |
Related Examples
Windows Forms: All Examples\Data Manipulation\Functions\Average, Median, Min, Max