Use enhanced scripted measures
The enhancement of the scripted measures provides the same base options as the not-enhanced scripted measures, but improves them with more complex calculations and queries. This allows, for example, calculating the SUM of a field divided by the total number of cases.
Enhanced scripted measures enable the combination of multiple scripted measures and constants in one field. Additionally, the scripted measures can be queried unfiltered or with additional filters.
Enter a name for the measure.
Select the data type of the measure from the drop-down menu.
Select the default granularity for the formatting from the drop-down menu. Time span formatting calculations must always be done in milliseconds for correct results.
Define the enhanced scripted measure using the relevant operators and operands for scripted definitions.
You find detailed examples of enhanced scripted measures in the following chapter.
Click Apply.
You created a measure using an enhanced scripted definition. The measure is added to the component.
If you want to use the legacy version of the script editor, enable Legacy mode. Legacy mode is disabled by default. This mode is automatically enabled only for existing scripts that were created with the previous script editor. Note that legacy mode is deprecated and it is strongly recommended to use the new enhanced mode.
You can also edit the measure later. Click the icon of the measure in the Configuration panel.