Measure Component

Function: a!measure()

Determines the calculations for fields on a chart.

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

Parameters

Name Keyword Type Description
Field field Any Type Reference to the record field to use in this calculation, configured using the recordType! domain. For example, recordType!Case.fields.status.
Function function Text Function to use with calculations on the field provided. Accepts "COUNT", "SUM", "MIN", "MAX", "AVG".
Alias alias Text The short name by which the result of the measure field can be referenced in other places of the chart configuration. Values are case-sensitive.
Label label Text 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.

Returns

Measure

Notes

  • This configuration is used when a record type is defined as the data source for a chart. This function can be within the measure parameter in a bar, column, line, or pie chart.
  • a!measure() must be used inside of a!barChartConfig(), a!columnChartConfig(), a!lineChartConfig(), or a!pieChartConfig().
  • The field and function parameters are required to display data on the chart. The field 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.
  • If no measure is provided, by default the chart will display as a count of the primary key field.
  • The label can determine the text label displayed in the legend or tooltip for the measure. 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 Built: Fri, Sep 17, 2021 (01:42:52 PM)

On This Page

FEEDBACK