Crystal Reports for Eclipse Designer Guide

Median

Description
Calculates the median of the given numeric fields.
Overloads
  • Median (fld)
  • Median (fld, condFld)
  • Median (fld, condFld, cond)
  • Returns
    Fractional Number
    Action
    Calculates the median of the given numeric fields. The median is the middle value in a sequence of numeric values (or the average of the two middle values in an even-numbered sequence of values).
    For example:
  • You can calculate the median of all the values in a field.
  • You can calculate the median of all the values in the field, within a group (for example, sales grouped by the state that they come from).
  • You can calculate the median of all the values within a group in which grouping is controlled by changes in a date or Boolean field (for example, sales grouped by the month in which they were made).
  • Examples
    Median({Customer.LAST YEAR'S SALES})
    Returns $29087, where the values of the Last Year's Sales field are $27014, $28000, $29087, $34500, and $48260.
    Median({Customer.LAST YEAR'S SALES}, {Customer.REGION)
    Groups the Last Year's Sales field by region and returns the median of the Last Year's Sales field per region.
    Median({orders.ORDER AMOUNT}, {Customer.REGION}, "monthly")
    Groups values in the Amount field by region, then returns the median of the order amount for each region per month.
    Using this function in a formula forces the formula to be evaluated at print time.
    For more information on evaluation time considerations, see Evaluation Time.



    SAP BusinessObjects
    http://www.sap.com/sapbusinessobjects/
    Support services
    http://service.sap.com/bosap-support/
    Product Documentation on the Web
    http://help.sap.com/