---
schema_version: "1"
id: 2dc24ac937613651f612e952a23df66ba8e70b7c52f0061ada92d6d3efe81f5c
title: Considerations, Guidelines, and Examples for Calculating Metrics
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/territory_planning_design_units_guidelines.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.territory_planning_design_units_guidelines.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 495bda434dc080b553cc2d257a38be251230b06f99cd46c111fd5599b140a33e
description: Consider formula logic and level when you calculate attributes in Territory Planning. The same attribute can produce different results depending on where it’s calculated. Put real-world examples into action when you tailor them to address your specific business requirements.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Considerations, Guidelines, and Examples for Calculating Metrics

Consider formula logic and level when you calculate attributes in Territory Planning. The same attribute can produce different results depending on where it’s calculated. Put real-world examples into action when you tailor them to address your specific business requirements.

### 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;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with <a href="https://help.salesforce.com/s/articleView?id=sales.territory_planning_api_access.htm&amp;type=5&amp;language=en_US" target="_blank">Web Services API enabled</a></td></tr></tbody></table>

## Considerations for Using Calculated Attributes

Calculated attributes:

- Can reference other calculated attributes or data imported from CSV files.
- Apply to individual datasets.
- Include case-sensitive text matching. They also include syntax validation for formulas except what’s inside brackets. Invalid variables are calculated as 0.
- Require numerical values for aggregations.
- Require the addition function for cross-unit formula aggregations.

## Guidelines for Calculated Attributes in Areas, Boundaries, and Units

Calculated attributes produce different results depending on the levels that you add them to.

  
| Level | How Calculated Attributes Can Help | Available for Optimization? |
| --- | --- | --- |
| Area | Gain insights into territories, such as market share. | No. |
| Boundary | Determine the value of certain boundaries. For example, discover whether a specific postal code has more growth potential compared with others. | Yes, unless they reference assignments or fields from units. |
| Unit | Optimize alignments based on formulas that address specific business needs. For example, reveal total sales by adding product-level sales together. | Yes, unless they reference assignments. |

## Examples of Using Metrics for Your Business Goals

 
| Goal and Solution | Sample Formula |
| --- | --- |
| Reveal total sales by adding product level sales together. | `[Sales Product A] + [Sales Product B]` |
| Prioritize sales from one product over another by combining and weighting fields. | `[Sales Product A] * .7 + [Sales Product B] * .3` |
| Show the number of accounts that match the criteria in the legend using segmentation flags. | `IF([Account Type]="Prospect", 1, 0)` |
| Calculate workdays per territory using visit frequency, visit duration, and travel time estimates | `(([Visit Frequency]*(([Travel Time Estimate]/60)+[Visit Duration]))/60)/8` |