Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
titleSyntax

median(value, [value, ...])

  • Parameters

Integer/Float value - A number. Can be as many values as needed. Can be either a float or an integer.

  • Returns

Integer/Float The median value in the list of values.


Editor_notes
New_in
Version8.1.8


The following overload was added in 8.1.8:

Panel
titleSyntax

median(sequence)

  • Parameters

Sequence sequence - A list, tuple, array, or set of numerical values. 

  • Returns

Integer/Float The median value in the list of values.


Panel
titleExamples
For example, suppose you had a table with this dataset in it:


ProductCode

Quantity

Weight

BAN_002

380

3.243

BAN_010

120

9.928

APL_000

125

1.287

FWL_220

322

7.889


Code Block
languageactionscript3
titleCode Snippet
median({Root Container.Table.data}, "Weight") //... would return 5.566.


Code Block
languageactionscript3
median(1,2,3,3,10) //... would return 3.


...