GMEDZ return the median of the values in the date range specified by the Offset and Grouping for the variable.
GMEDZ(VarNum,GroupOffset/StartDate,Grouping/EndDate, Decimal Places, MDL Rule, Optional No Value Print)
VarNum: The variable number to get the median for.
GroupOffset/StartDate: Used with the Grouping parameter to set the dates to calculate the stat for. Sets the number of Groups (set by the Grouping Parameter) to be added to set the dates. See examples below. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the start date to calculate the stat for.
Grouping/EndDate: Used to set which dates to calculate the stat for. If the Grouping is a date literal string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the end date to calculate the stat for. Common Groupings are:
"R" Report Dates
Click here for availiable Grouping options
Decimal Places: Sets the number of decimal places to be displayed. For variables with decimal places set to "Not Fixed" click here for additional formatting options.
MDL Rule: Ignored.
No Value Print: (Optional) Sets a string to be displayed if there are no values in the date range.
In Design, Spread Reports use Locate, Group Summary to place this formula on a report. Returns the number in the middle of the sorted set of numbers; that is, half the numbers have values that are greater than the median, and half have values that are less than the Median. If there are an even number of arguments, the function calculates the average of the two numbers in the middle if they both do not contain a data qualifier. If one or both of the two values in the middle contain a data qualifier, the function will return the lower of the two values.
GMEDZ(4702, 1, "M",2,1) Returns the median for the current month for variable 4702.
GMEDZ(4702, "1/1/08", "3/2/08",1,1) Returns the median for the values in the date range of 1/1/8 to 3/2/08 for variable 4702.