---
schema_version: "1"
id: c96bfacb2e11ecb5f311509f5cb9d6aac477479be0b6dc21c106da00c89c12b1
title: Understanding How KPI Values are Calculated When Other KPIs are Referenced
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/concept_formula_general_structure.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.concept_formula_general_structure.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d6b2006d29c9c9a50107115085fc6eadf105842703e192885c1042427369c0e8
description: Understand how KPI is calculated.
products:
  - Consumer Goods
release: "264"
---
# Understanding How KPI Values are Calculated When Other KPIs are Referenced

Understand how KPI is calculated.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
      <colgroup>
        <col>
      </colgroup>
      <tbody>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p>Available in: Lightning Experience</p>
            <p style="margin-bottom:0;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions where Consumer Goods
              Cloud is enabled</p>
          </td>

        </tr>
      </tbody>
    </table>

Here’s the structure of a formula to calculate KPIs.

```
(Param1,Param2,...,Paramn) =>
{
return (Param1+Param2+...+ Paramn);
}
```

The string consists of three parts:

- Input parameters—`(Param1, Param2, ..., Paramn)`
- Arrow
- Algorithm—`{ return Param1 + Param2 + ... + Paramn; }`

Only the defined input parameters can be accessed for calculation, with one exception: calcHelper, which is a collection of functions, can be accessed even if it isn’t specified as an input parameter.

Provide one of these options as an input parameter for a formula:

- Other KPIs of the same granularity
- Other KPIs of a coarse granularity
- Available dimensions

Granularity is the level from where the requested value is taken. The usable levels are defined via the dimensions on the Y-axis, which is a KPI measure, tactic, or product. You can’t access the value at the tactic level if the KPI is tactic-independent.

The system checks for self-references and terminates the calculation if a self-reference is found. The system doesn’t check for circular references, which means that if KPI A references KPI B, and KPI B references KPI A, the calculation can’t be successful.

- **[Example: Referencing Other KPIs of the Same Granularity](https://help.salesforce.com/s/articleView?id=ind.concept_refrencing_other_kpis_same_granularity.htm&release=264.0.0&type=5)**  
    You can specify other KPIs as an input parameter in a formula.
- **[Example: Referencing Other KPIs of Different Granularity](https://help.salesforce.com/s/articleView?id=ind.concept_refrencing_other_kpis_different_granularity.htm&release=264.0.0&type=5)**  
    For some KPIs, you can reference the aggregated value of another KPI, for example, when calculating the percentage of volume of the current tactic that is contributed by the current product.
- **[Example: Referencing Total Values of Other KPIs with Different Granularity](https://help.salesforce.com/s/articleView?id=ind.concept_refrencing_total_values_other_kpis_different_granularity.htm&release=264.0.0&type=5)**  
    You can reference the total value of a KPI with a different granularity to calculate the values of a KPI.
- **[Example: Referencing Variables](https://help.salesforce.com/s/articleView?id=ind.concept_referencing_variables_examples.htm&release=264.0.0&type=5)**  
    Depending on the scope of a KPI, you can reference a promotion or a tactic variable in a formula.
- **[Example: Calculating KPIs of Subperiod Time Granularity](https://help.salesforce.com/s/articleView?id=ind.tpm_concept_enabling_kpis_at_subperiod_level_to_calculate_values_with_parameter_kpis_at_period_level.htm&release=264.0.0&type=5)**  
    This example shows how a calculated or editable calculated KPI of time granularity subperiod is calculated when KPIs with time granularity period are included in the KPI formula.