Add scripted measures
You can add scripted measures to a component by means of scripted definitions.
On the Configuration panel, click + Add measure. The Model panel opens.
Click
Add scripted definition. The code editor opens.
In the code editor, define the measure including its aggregation type, such as average (AVG), as follows:
aggregation(table identifier.field identifier)
Example
AVG("_ARIS.Case"."Number of activities per case")
For details on available aggregation types, see the chapter Operators and operands for scripted definitions.
You can use variables instead of field names, aggregation types, or parameter values. You can also insert the entire script into a variable.
Examples
MONTHS("_ARIS.Case"."${variable}")
${variable}("_ARIS.Case"."Case start time")
If you use calculated fields that take parameters as input, you can pass on the parameter value with the FIELD operator.
FIELD("field name", 'parameterValue1', '${variable}') (The FIELD operator provides the values for parameters created for calculated fields.)
Click Apply.
You created a scripted measure. The measure is added to the Configuration panel of the component.