---
sourceDocument: Xanadu Platform Analytics
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/now-intelligence

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu Platform Analytics

ft:clusterId :

    - par

bundleId :

    - par

workflow :

    - Platform


---

# Indexing multiple indicators in a formula

# Indexing multiple indicators in a formula {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

You can write a formula to measure what the gap is to the overall target of multiple,
combined indicators. Such a formula indicator is called an 'index indicator'.  
The performance of processes, services, groups, and other business entities are often tracked and monitored using more than one indicator. When viewing and analyzing performance of these processes, business services, or workgroups, the overall picture can be confusing and ambiguous. For example:

* Although the scores for three indicators improved somewhat, the scores for 2 of them are still below target and 1 is above target.
* The score for one indicator remained more or less the same and is still below target.
* The score for one indicator did significantly deteriorate, but is fortunately just above target.
{#index-indicators__ul_ozp_hjp_4fb}  
Looking at this information, the answers to the following questions are not clear:

* Is the overall performance of the process/service/group still at or above the desired level?
* Did the overall performance improve?
{#index-indicators__ul_x4k_1bf_sfb}

An index indicator can answer these questions. With an index indicator, the scores of multiple
indicators are aggregated into one score. It is a weighted average of several indicators. If the
weighted sum of these indicators is improving, the calculated score of the index formula goes up.
As with any other indicator, the index indicator shows if the score is good or not and if the
score has improved or not.

The principle behind an index indicator is to calculate a score value indexed to 100 for each
indicator. When you have these indexed scores, you are mathematically allowed to calculate an
overall average of them.  
To be included in an index indicator, an indicator must have a direction and a target. The basic formula to calculate the indexed score for an indicator that has a Maximize direction is:

    100 + (((actual score - target) / target) * 100)

For indicators that have a Minimize direction, the formula is:

    100 - (((actual score - target) / target) * 100)

If you are weighting the indicators evenly, you can index the final aggregation to 100 instead
of indexing the individual indicators to 100.  
You can use methods of the PAFormulaUtils() API to get the gap between score and target for the indicator from the Analytics Hub. For more information, see [Get analytics methods in formulas](https://servicenow-prod.fluidtopics.net/cnVqjX~HC_wNUdbpJEVaJQ "To insert a calculated value from the Analytics Hub into a formula, use a method in the formula."):

    pa.getGap(indicator, On date) / pa.getGlobalTarget(indicator, On date)

Because of the different operator for the different direction, if the score of an underlying
indicator is improving (up or down), the index indicator score is increasing. Therefore, always
set the direction of the index indicator to Maximize.

If no target value is set for an indicator, use a norm value instead. Indicators that have a
target or norm value equal to 0 cannot be used in the index indicator, because it would require
dividing by 0.

Set a target of 100 for each index indicator. This target is the calculated, overall, indexed
score if all underlying indicators have an actual score equal to their target or norm value.

An index indicator is measuring what the gap is to the overall target of multiple, combined
indicators. It is measuring the 'Percentage of Target Achievement'.  

## Index indicator using PAFormulaUtils() methods

In the following example, you want a single index that aggregates the gap between score and global target for the following indicators:

* The percentage of incidents that are overdue.
* The average age of the last update of open incidents.
* The total number of open incidents.
{#index-indicators__ul_ezd_m3q_4fb}  
To get this single index, you follow these steps to produce an index indicator:

1. You navigate to Performance AnalyticsFormula Indicators and click New. Index indicators are a use case of formula indicators.
2. You give the indicator a meaningful name, such as Aggregate incident gap.
3. Because you are creating an index indicator, you set the Direction to Maximize.
4. In the Formula field, you use the Browse for a method and Browse for an indicator functions to create the following formula:

       var a = pa.getGap($[[% of open overdue incidents]], score_start) / pa.getGlobalTarget($[[% of open overdue incidents]],score_start);
       var b = pa.getGap($[[Average age of last update of open incidents]], score_start) / pa.getGlobalTarget($[[Average age of last update of open incidents]], score_start);
       var c = pa.getGap($[[Number of open incidents]], score_start) / pa.getGlobalTarget($[[Number of open incidents]], score_start);
       var res = 100 - (100 * (a + b + c) / 3);
       res;

   The three indicators are weighted equally, so the aggregation is indexed to 100 instead of the individual indicators.
{#index-indicators__ol_czj_hbf_sfb}
**Related concepts**   

* [Prevent a contributing indicator in a formula from following breakdowns](https://servicenow-prod.fluidtopics.net/KftBL97ueZwJ2qomNKiwxA "You can select contributing indicators in a formula to not be broken down. When a user applies a breakdown to the formula indicator, the breakdown does not apply to these indicators.")
* [Breakdown matrices in formula indicators](https://servicenow-prod.fluidtopics.net/arwRe8KHfg_nNnkcErCXrA "Formula indicators inherit breakdown matrices from indicators in the formula.")
* [Applying time series to result or to contributing indicators](https://servicenow-prod.fluidtopics.net/dzRy4qKDo1sknlH6AoDN8Q "For a formula indicator, a time series aggregation can apply either to each indicator in the formula individually or to the formula result.")
* [Changes to score_start/end because of different user time zones](https://servicenow-prod.fluidtopics.net/8qx69w7Vx1gQQvOa7_TIDw "For formula indicators, the values of the variables score_start and score_end are calculated based on the time zone of the user who is executing the formula. If users in different time zones execute the same formula, the values of score_start and score_end change.")  
**Related tasks**   

* [Create a formula indicator](https://servicenow-prod.fluidtopics.net/pYgFpM6BB3XdUgPM_9DgPQ "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.")
* [Get analytics methods in formulas](https://servicenow-prod.fluidtopics.net/cnVqjX~HC_wNUdbpJEVaJQ "To insert a calculated value from the Analytics Hub into a formula, use a method in the formula.")
* [Detect indicators with no scores in a formula](https://servicenow-prod.fluidtopics.net/fTqPC09KyYCVj_CvqcZxDg "As the formula creator, you can handle contributing indicators that have null scores. First set the formula indicator to calculate the formula even when it contains a null score.")

*[\>]: and then


