---
sourceDocument: Yokohama Governance, Risk, and Compliance
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/governance-risk-compliance

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Governance, Risk, and Compliance

ft:clusterId :

    - grc

bundleId :

    - grc

workflow :

    - Technology


---

# Formula building in a calculated metric definition

# Formula building in a calculated metric definition {#ariaid-title1}

* Release version: Yokohama
* 
* Updated July 31, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

In a calculated metric definition, you can create formulas to perform calculations for any data that you may require.

A formula consists of operands, operators, and functions. For example, to calculate total employee count from male and female employee metrics, the metrics act as operands, and the operator performs the calculation to produce the
result. Examples of operators include addition (+), subtraction (-), multiplication (\*), and division (/).  
When you build a formula in a calculated metric definition, you can choose to build it at either the metric definition level or at the entity level. Before you save the calculated metric definition form and create the score formula, you must specify the calculation level in the calculated metric definition form. The two levels are as follows:

* Metric definition: If you select Metric definition in the Calculation level field, then the data across all child metric definitions or child metrics is used for calculation. When you select Execute, the formula is applied and the calculated metric definition data is generated. For more information, see [Configure the formula builder](https://servicenow-prod.fluidtopics.net/54yDXsEMTwcMy1TA2gqCHg "Specify the formula context, the tables, and the identifiers before you can build a formula."). The following image shows how calculation occurs at the metric definition level:
* Entity: If you select Entity in the Calculation level field and specify the calculation method using the formula builder, then the child metrics are created for the calculated metric definition. These metrics are created for each distinct entity that is associated with the metric definitions that have been used as operands in the formula. When you Execute the metric definition, the formula is applied and the metric data is generated. When you Aggregate the metric definition, the metric data is aggregated and the calculated metric data is generated. The following image shows how calculation occurs at the entity level:
{#formula-building-at-metric-definition-and-entity-level-irm__ul_ifc_45q_25b}
* **[Configure the formula builder](https://servicenow-prod.fluidtopics.net/54yDXsEMTwcMy1TA2gqCHg)**   
  Specify the formula context, the tables, and the identifiers before you can build a formula.
* **[Create a formula](https://servicenow-prod.fluidtopics.net/2J1RDokIt3Ge2zCk0gZ3sQ)**   
  Build your own formula using either entities or metric definitions.

