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 |
---|---|---|---|
Field |
|
Any Type |
Reference to the record field to use in this calculation, configured using the |
Function |
|
Text |
Function to use with calculations on the field provided. Accepts |
Alias |
|
Text |
The short name by which the result of the measure field can be referenced in other places in the chart configuration or |
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. This parameter is ignored when used in |
Measure
measure
parameter in a bar, column, line, or pie chart or a query with records.a!barChartConfig()
, a!columnChartConfig()
, a!lineChartConfig()
, a!pieChartConfig()
, or a!aggregationFields()
.field
and function
parameters are required. The field
parameter also must reference a field used in the source record type.sort
parameter within the parent configuration function.a!measure()
in a query, the alias is required.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.The following patterns include usage of the Measure Component.