a!measure( field, function, alias, label )
Determines the numerical values to display on a query or chart. The measure should incorporate a record field or a related record field, the appropriate calculation to run on the field, and an alias.
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.
The a!measure()
function must be used inside one of the following:
a!barChartConfig()
a!columnChartConfig()
a!lineChartConfig()
a!pieChartConfig()
a!aggregationFields()
.See also:
Name | Keyword | Types | Description |
---|---|---|---|
Field |
|
Any Type |
The record field or related 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 |
SUM
, MIN
, MAX
, and AVG
can only be used with fields of type integer or decimal.a!measure()
in a query, the alias is required.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.
Aggregate Data and Conditionally Display in a Chart or Grid (Reports, Charts, Query Data, Grids): Aggregate data and conditionally display it in a pie chart or grid. In this pattern, we will calculate the total number of employees in each department and display it in a pie chart and a read-only grid. Then, we'll use a link field to conditionally display each component.
Aggregate Data by Multiple Fields and Display in a Chart (Reports, Charts, Query Data): Aggregate data by multiple fields and display it in a stacked column chart.
Aggregate Data on a Date or Date and Time Field (Reports, Query Data, Grids): Aggregate the total number of employees by date and display it in a bar chart.
Configure a Chart Drilldown to a Grid (Charts, Grids, Query Data): Displays a column chart with aggregate data from a record type and conditionally shows a grid with filtered records when a user selects a column on the chart.
Filter the Data in a Grid Using a Chart (Charts, Grids, Filtering): Display an interactive pie chart with selectable sections so that a user may filter the results in a grid.