Measure Component

Function: a!measure()

Determines the numerical values to display on a query or chart that use a record type as the source. The measure should incorporate a record field, the appropriate calculation to run on the field, and an alias.

See also: Chart Configuration Using Records, Column Chart Config, Bar Chart Config, Line Chart Config, Pie Chart Config, Grouping Component


Name Keyword Types Description



Any Type

Reference to the record field to use in this calculation, configured using the recordType! domain. For example, recordType!Case.fields.status.




Function to use with calculations on the field provided. Accepts "COUNT", "SUM", "MIN", "MAX", "AVG".




The short name by which the result of the measure field can be referenced in other places in the chart configuration or a!queryRecordType().




Text to display in the legend or tooltip when using the measure in a chart. If no label is defined, the label displays with the function name and field name. The label only displays if a single grouping is used on a bar, column, or line chart. This parameter is ignored when used in a!queryRecordType().




  • This configuration is used when a record type is defined as the data source for a chart or query. This function can be within the measure parameter in a bar, column, line, or pie chart or a query with records.
  • a!measure() must be used inside of a!barChartConfig(), a!columnChartConfig(), a!lineChartConfig(), a!pieChartConfig(), or a!aggregationFields().
  • The field and function parameters are required. The field parameter also must reference a field used in the source record type.
  • The functions "SUM", "MIN", "MAX", and "AVG" can only be used with fields of type integer or decimal.
  • If an alias is provided, it can be used as the field in the sort parameter within the parent configuration function.
  • When using a!measure() in a query, the alias is required.
  • If no measure is provided in a chart, by default the chart will display as a count of the primary key field.
  • The label determines the text label displayed in the legend or tooltip for the measure when used in a chart. This parameter is ignored when used in a!queryRecordType. If no label is provided, the default label displays with the function and field name, such as Count of id. The label does not apply when used with a secondary grouping, as the label is then determined by the secondary grouping field value. Also, the label does not apply when using a measure in a pie chart.
Open in Github

On This Page