Skip to main content
Sumo Logic


Calculates the median value for a given field.

In order to calculate the median value for a particular field, you can utilize the Percentile (pct) operator with a percentile argument of 50.


  • ...| pct(fieldname [, 50]) [as alias] [by group]


  • Creates a field named _fieldname_pct_percentile.


For example:

* | parse "data=*" as data
  | pct(data, 50) as median

To calculate the median value of a field called "Len:*" as seconds, and then take the median, use the following query:

| parse "Len: *" as seconds
| pct(seconds,50) as median

Which would return results similar to: