Median fx in .AML file

Hi there Team, I am looking to MEDIAN fx into our PROD .AML file and was wondering if this fx is available ?

eg: median(first_time_reply)

measure median_time_to_first_reply_mintues {
label: “The medianTime to First Reply minutes”
type: “number”
definition: @sql median({{ time_to_first_reply_minutes }}) ;;
description: “The median time to the first reply in minutes.”
aggregation_type: “custom”
format: “#,###0.0”

Hi @Grant_Orchard ,

Yes, we do support ‘median’ in measure, you need to declare the aggregation_type as median. For example:

measure median_time_to_first_reply_mintues {
  label: "The medianTime to First Reply minutes"
  type: "number"
  definition: @sql {{ time_to_first_reply_minutes }} ;;
  description: "The median time to the first reply in minutes."
  aggregation_type: "median"
  format: "#,###0.0"
}

Fyi, we also support the other aggregation_type: median, stdev, var, stdevp, varp. Btw, these are not shown in the UI yet, we’ll add them to UI soon.

1 Like

AMAZING!! Thank you!! so much!!

2 Likes