Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5   10.6    Statistic    FMM    Blog  

Matrix.Avg

Calculates average value in a matrix column.

Component Version macOS Windows Linux Server FileMaker iOS SDK
Matrix 9.2 Yes Yes Yes Yes Yes
MBS( "Matrix.Avg"; MatrixRef; Column { ; firstRow; lastRow } )   More

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 FM.SQL.RowCount-1.
5 Optional

Result

Returns number or error.

Description

Calculates average 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 add the sum value and later divide by number of values.

Examples

Calculate average:

Set Variable [ $r ; Value: MBS( "Matrix.Avg"; $matrix; 1;2;5 ) ]

See also

Created 8th April 2019, last changed 17th December 2019


Matrix.AddRows   -   Matrix.CSV

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins

Start Chat