median
Computes the median of a sheet, optionally grouped by rows or cols,
skipping "-" and undefined.
API Reference
Signature
Parameters
Returns
Same shape as sum, depending on by. The default sorts valid values
ascending; an even count averages the two middle values. Empty buckets are
"-".
Throws
SHEET_INVALID_AGGREGATE_OPTIONS— invalidbyor non-functionusing.
Agent Contract
Agent Notes
- The default median handles
numberonly; supplyusingfor custom types. - A
usingoverride is not required to preserve median semantics.