Newer Version Available

This content describes an older version of this product. View Latest

median()

Returns the median value of a measure or date field.

Example - Find the Median Time to Close a Case

Use median() to find the median amount of time it takes to resolve a case, grouped by company.

1q = load "Case";
2q = group q by 'Account_Name';
3q = foreach q generate 'Account_Name' as 'Account_Name', median('CallDuration') as 'median_CallDuration';
4q = order q by 'Account_Name' asc;