You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


median

Returns the median of all the values in a column.

Examples

Compute the median of the values in the data column AMOUNT_SOLD.

median(Sales_Acme.Sales.AMOUNT_SOLD)

Compute the median of AMOUNT_SOLD by QUARTER_NUMBER.

median(Sales_Acme.Sales.AMOUNT_SOLD,
  groupBy(Sales_Acme.Sales.QUARTER_NUMBER))

Syntax

median(double expr, [groupBy(...)])
  • expr : expression evaluating to double
  • groupBy : optional grouping function

    Returns

    double representing the median of the values in the column. If groupBy is used, median returns the median for each group.

Notes

You must include all the leading grouping dimensions in the Insight from the top-down to the level-based measure you want to evaluate. See Aggregation with Level Based Measure in Aggregating Functions.


© Incorta, Inc. All Rights Reserved.