Create a formula indicator
Create a formula indicator to produce a new computed score from one or more other indicators. Besides indicator scores, the formula can include calculations such as the gap between an indicator score and the indicator target.
Before you begin
Role required: pa_power_user, pa_admin, or admin
About this task
- Calculate ratios and percentages.
- Combine data from different applications.
- Build predictive indicators based on historic performance.
The fields of a formula indicator are similar to the fields of an automated indicator. However, instead of Source, Additional Conditions, and Collection properties, a Formula Statement is defined. Formulas can consist of other indicators, constants, variables, and time series, or any combination of these elements.
- You must have a subscription for Performance Analytics to create indicators.
- If you’re using domain separation, the indicator is created in the domain that you’re currently in.
Procedure
- Navigate to All > Platform Analytics Administration > Indicators > Formula Indicators and select New.
- In the Name field, give the indicator a descriptive name, such as Average duration of open incidents.
- In the Calendars field, select either the standard calendar or a business or fiscal calendar group.
-
If you selected a business or fiscal calendar, select the calendar frequency.
At least one indicator in the formula must match the specified calendar frequency. The choice of calendar frequencies depends on the setting of the business calendar entries or fiscal calendar schedules.For example, the Gregorian calendar has Quarter, Month, Week, and Year frequencies. If you're using the Gregorian calendar, you must choose one of these frequencies.
-
If you prefer that the score of this indicator increases or decreases over time, select Maximize or Minimize in the Direction field.
Analytical tools and graphic displays use this Direction with this indicator.Tip:Set a direction whenever you can. All key indicators should be set to Maximize or Minimize.
Value Use case Maximize Select if an increase in this indicator score is desired. For example, consider selecting Maximize for an indicator that shows revenue. Analytic tools and graphic elements reflect that an increase in this indicator score is good and a decrease is bad. Minimize Select if a decrease in this indicator score is desired. For example, consider selecting Minimize for an indicator that shows costs. Analytic tools and graphic elements reflect that a decrease in this indicator score is good and an increase is bad. None Select if the direction of change in this score doesn’t matter to your business. -
Define the Formula for this indicator.
-
To use a calculated value in the formula, tap Browse for a method (Repeatable).
A dialog opens for you to insert a method from PAFormulaUtils() into the formula. This API returns the calculated value for an indicator. For more information about using this API, see Get analytics methods in formulas.
-
To put the score of an indicator in the formula, tap the Browse for an indicator link and fill in the dialog (Repeatable).
Table 1. Indicator selection dialog Field Description Indicator The indicator you're inserting as a contributing indicator into the formula. If you use a business or fiscal calendar for this indicator, at least one indicator in the formula must use the matching calendar and calendar frequency.
Breakdown, Element, second-level Breakdown, second-level Element Up to two levels of breakdown and element for filtering the scores on the indicator. If you specify a breakdown, you must specify an element of that breakdown. These breakdowns and elements apply only to this contributing indicator and not to the formula indicator as a whole. Time series A predefined analytical function, like a 7-days running average, to apply to the indicator instead of showing the raw scores of the indicator. This time series applies only to this contributing indicator and not to the formula indicator as a whole. Allow breakdowns Applies breakdowns that apply to the entire formula indicator, as opposed to individual indicators in the formula, to apply to this contributing indicator. Enabled by default. For more information, see Prevent a contributing indicator in a formula from following breakdowns. Breakdowns are added to the entire formula through the Manage breakdowns dialog, available after the indicator is saved. See Step 11.
Use in method Returns a unique identifier instead of the score for this indicator. Select this box when you're specifying an indicator for a method in the formula. These methods get calculated values for the indicator from the Analytics Hub. For more information about using these methods, see Get analytics methods in formulas. You could add indicators manually. However, by using the Browse for an indicator function, you ensure that you have the proper notation for indicators and breakdown elements.
After you save the formula indicator, the indicators in the formula appear in the Contributing indicators related list. If you included any formula indicators, their contributing indicators are also listed. -
Add mathematical operators and symbols to the
Formula as needed.
Enter any operators or numbers to include in the formula. Use valid operator symbols, such as +, -, /, %, >, <. You can also add more indicators to the formula. For example, to calculate the average age of open incidents based on summed age of open incidents and number of open incidents, use the following formula:
[[Summed age of open incidents]] / [[Open incidents]] / 24To specify a data collection period in the formula, you can use the variablesscore_startandscore_endto refer to the start and end of the data collection period, respectively. However, see the caveats in Changes to score_start/end because of different user time zones.Warning:Try not to use GlideRecords or GlideAggregates in Performance Analytics scripts or formula indicators. While sometimes you must use these operations to get what you want, they are expensive, potentially running hundreds of thousands of times. Be certain that no alternative exists before you use them.
-
To use a calculated value in the formula, tap Browse for a method (Repeatable).
- In the Access control tab, set whether to save this indicator to the library and whether to limit the visibility of the indicator by user, group, or role.
-
In the Other tab, set miscellaneous properties.
These properties apply to the entire formula indicator.
Table 2. 'Other' tab fields Field Description Default time series A predefined analytical function, such as a 7-day running average. Depending on whether Apply time series to result is set, this time series can apply either to each component indicator before the result is calculated, or to the result. Live group profile Live Group Profile [live_group_profile] record for a Live Feed group. Specify a group profile to cause that group to get notifications about this indicator.
For more information about this social application on the ServiceNow AI Platform, see Live Feed.
Order Number indicating the order in which indicators are displayed in the Analytics Hub. Indicators with the lowest value are displayed at the top of the list. If no values are provided in the Order field, indicators are displayed from a to z using the Name field. To use the order field, you must enter order numbers for all indicators. If you put in numbers for only a few indicators, the order in which indicators are displayed reverts to a to z.
Not used in Platform Analytics experience.
Render continuous lines When selected, the Analytics Hub and KPI Details show unbroken data lines for this indicator, even when there’s no data for a specific date. This behavior may be useful when displaying datasets with varied starting dates or for data that aren’t regularly updated, such as stock information.
Continuous lines aren’t rendered when a time series is set on the indicator or the Analytics Hub or KPI Details.
Apply time series to result Applies a time series aggregation to the result of the calculation of the formula instead of to each component indicator before the result is calculated. This option applies to a time series selected for the indicator on a widget or on the Analytics Hub. If a default time series is specified for the indicator, this option also applies to that time series. For more information, see Applying time series to result or to contributing indicators. Allow formula component to be NULL Has the formula calculated even when it contains a null score. Useful for troubleshooting. For more information, see Detect indicators with no scores in a formula. Allow aggregation of multiple breakdown element scores Enables widgets to show the summed score of multiple breakdown elements on this indicator. If this field is selected, you can select either aggregated or separated values on the form for a breakdown dashboard that uses this indicator. Formulas based on addition, subtraction, or multiplication are generally good candidates for allowing aggregation. Percentages are also supported, provided the percentages total to 100%. On the other hand, the results of aggregating elements on averages, or of percentages that are not related, are usually not meaningful. Warning:These aggregations are not checked for mathematical validity. - Optional:
In the Forecasting tab, set
the forecast method, the number of data collection periods to forecast, the
amount of historical data to base the forecast on, and the upper and lower
limits of forecast values.
For more information, see Performance Analytics scores forecasts.
-
Expand the context menu and select Save.
-
To apply a breakdown to the entire formula indicator, press Manage breakdowns at the top of the page.
By default, you can apply only breakdowns that are configured for every contributing indicator in the formula.Note:The system property com.snc.pa.formula_indicator_valid_breakdown controls this behavior. By default, it is true. Changing it to false allows you to apply a breakdown to a formula indicator when at least one contributing indicator uses that breakdown. Attempts to view scores for unsupported breakdowns in a widget, the Analytics Hub, or KPI Details result in a warning message instead of a value.
You cannot select a breakdown element in the formula indicator record. The breakdown can only be used interactively, meaning on the Analytics Hub, KPI Details, appropriately configured data visualizations, and dashboards. For information about using the Manage breakdowns tool, see Assign and map breakdowns.
Incident Backlog Growth
As an Incident Manager, you want to improve the efficiency of incident resolution. You already track new and resolved incidents as the Number of new incidents and Number of resolved incidents indicators. However, these indicators do not tell you if you're achieving your goal of improving incident resolution.
[[Number of new incident]] - [[Number of resolved incidents]]