Skip to content

MAX_AVERAGE

Calculates the largest AVERAGE data field value for single or multi-loop data field value groups, all subject to data field filters if desired. Where the output can be changed to the second, third or so on highest AVERAGE. Where the output can also be changed to the corresponding loop field group value.

MAX_AVERAGE function overview

Function syntax

MAX_AVERAGE(AVERAGE input | Loop1, ... | filter1, ... | OUTPUT[field], RANK[n])

Arguments:

  • AVERAGE input: The data field to average.
  • Loop1, …: The data field to split the data (e.g., by product, by region) for the averages. Multiple loop fields supported.
  • filter1, …: (optional) The data field and value(s) used to limit the data. Can reference a cell (including DROPDOWN cells) for the field filter value.
  • OUTPUT[field]: (optional) Select the loop field corresponding value as the output instead of the average.
  • RANK[n]: (optional) Return the Nth highest average instead of the maximum (e.g., RANK[2] for second highest).

Examples

  • MAX_AVERAGE(sales | product) - Highest average of sales by product.
  • MAX_AVERAGE(sales | product | channel{“Online”}) - Highest average sales by product, Online channel only.
  • MAX_AVERAGE(sales | product | | OUTPUT[product]) - Which product has the highest average sales.
  • MAX_AVERAGE(sales | product | | OUTPUT[product], RANK[2]) - Which product has the second highest average of sales.
  • MAX_AVERAGE(sales | product, region) - Highest average of sales by product and region combined.