Matrix.Max
----------

Queries max value in a matrix column.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Matrix](component_Matrix.md) | [9.2](newinversion92.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Matrix.Max"; MatrixRef; Column { ; FirstRow; LastRow } ) 

**MBS**( **"Matrix.Max";** /\* Queries max value in a matrix column. \*/  
**$MatrixRef**; /\* The matrix reference number.e.g. $matrix \*/   
**$Column**; /\* The index of the column.  
Default is 0.e.g. 0 \*/   
**$FirstRow**; /\* Optional; The index of first row.  
Default is 0.e.g. 0 \*/   
**$LastRow**) /\* Optional; The index of last row.  
Default is [Matrix.Height](MatrixHeight.md)-1.e.g. 5 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MatrixRef | The matrix reference number. | $matrix |  |
| Column | The index of the column.   Default is 0. | 0 |  |
| FirstRow | The index of first row.   Default is 0. | 0 | Optional |
| LastRow | The index of last row.   Default is [Matrix.Height](MatrixHeight.md)-1. | 5 | Optional |

### Result

Returns number or error.

### Description

Queries max value in a matrix column.  
You got a record set in memory and we can walk over a column in a given row range to find the maximum value.  
### Examples

Calculate max:

 Set Variable \[ $Max ; Value: MBS ( "Matrix.Max"; $matrix ; 1 ) \]  
### See also

- [Matrix.Height](MatrixHeight.md)
- [Matrix.MBS](MatrixMBS.md)
- [Matrix.Min](MatrixMin.md)

### Blog Entries

- [CSV in FileMaker with MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2022-10-11/CSV_in_FileMaker_with_MBS_File/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 4/2019, Seite 30](https://filemaker-magazin.de/neuigkeit/4053-Appetithappen-FMM_201904)

This function checks for a license.

Created 8th April 2019 , last changed 7th April 2022

  
[Matrix.MBS](MatrixMBS.md) - [Matrix.Min](MatrixMin.md)

[HTML Version](MatrixMax.shtml)