---
schema_version: "1"
id: 051138a41754cfafae61c06376102546bc63ba183d16a73d6f677c548965b1fa
title: Analyze Sales Data with Calculated Insights
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_analyze_ci_dc4sales.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_analyze_ci_dc4sales.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9d57639466ef41fd19c83fc921abb73a589294e85249bb046f9f59223c2360c6
description: Calculate multidimensional metrics on your data within Data Cloud. You can create metrics at the profile, segment, and population levels. For example, evaluate performance at the channel level or use product metrics to understand purchasing and browsing behavior.
products:
  - Data 360
release: "264"
---
# Analyze Sales Data with Calculated Insights

Calculate multidimensional metrics on your data within Data Cloud. You can create metrics at the profile, segment, and population levels. For example, evaluate performance at the channel level or use product metrics to understand purchasing and browsing behavior.

### 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: <strong>All Editions</strong> supported by Data 360. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;release=264.0.0&amp;type=5" title="Data 360 is available in several supported Salesforce editions. Some Data 360 features also require additional licenses.">Data 360 edition availability</a>.</td></tr></tbody></table>

A Data Cloud architect can write SQL expressions or use the SQL Insight Builder to create metrics and dimensions from mapped objects and fields. Then using Data Explorer, you can view Data Cloud data from your data lake objects (DLOs), data models objects (DMOs), or calculated insight objects (CIOs).

## Create a Calculated Insight

Before creating a calculated insight, use identity resolution to produce unified profiles.

1. In Data Cloud, on the Calculated Insights tab, click **New**.
2. From the Data Space dropdown, select a data space (which may be set to default).
3. Click **Create with SQL** and click **Next**.
4. Enter the calculated insight name and an optional description. The API name field is auto-filled.
5. Replace the example expression with this example SQL query: Unified Individual Counts by Sales Object.
    
    ```html
    SELECT UnifiedIndividual__dlm.ssot__Id__c AS Customer_Id__c
        ,approx_count_distinct(iil.Contact_Id__c) AS Contact_Count__c
        ,approx_count_distinct(iil.Lead_Id__c) AS Lead_Count__c
        ,approx_count_distinct(iil.ssot__AccountId__c) AS Account_Contact_Count__c
        ,approx_count_distinct(iil.ssot__DataSourceId__c) AS Salesforce_Org_Count__c
    FROM UnifiedIndividual__dlm
    /* The sub-query is required to perform case statements prior to aggregating */
    LEFT JOIN (
        SELECT IndividualIdentityLink__dlm.UnifiedRecordId__c AS UnifiedRecordId__c
       	 ,IndividualIdentityLink__dlm.SourceRecordId__c AS SourceRecordId__c
       	 ,IndividualIdentityLink__dlm.ssot__DataSourceId__c AS ssot__DataSourceId__c
       	 ,CASE
       		 WHEN IndividualIdentityLink__dlm.ssot__DataSourceObjectId__c = 'Contact'
       			 THEN IndividualIdentityLink__dlm.SourceRecordId__c
       		 ELSE NULL
       		 END Contact_Id__c
       	 ,CASE
       		 WHEN IndividualIdentityLink__dlm.ssot__DataSourceObjectId__c = 'Lead'
       			 THEN IndividualIdentityLink__dlm.SourceRecordId__c
       		 ELSE NULL
       		 END Lead_Id__c
       	 ,AccountContact.ssot__AccountId__c AS ssot__AccountId__c
        FROM IndividualIdentityLink__dlm
        LEFT JOIN (
       	 SELECT DISTINCT ssot__AccountContact__dlm.ssot__IndividualId__c AS ssot__IndividualId__c
       		 ,ssot__AccountContact__dlm.ssot__AccountId__c AS ssot__AccountId__c
       	 FROM ssot__AccountContact__dlm
       	 ) AccountContact ON IndividualIdentityLink__dlm.SourceRecordId__c = AccountContact.ssot__IndividualId__c
        WHERE IndividualIdentityLink__dlm.ssot__DataSourceId__c LIKE 'Salesforce_00D%'
        ) iil
        /* "Data Source ID like Salesforce_00D%" identifies Salesforce CRM sources. 00D is the prefix for the Org ID object type.
         * This is optional but it adds greater certainty that this is a Salesforce Org source ID from the connector.*/
        ON UnifiedIndividual__dlm.ssot__Id__c = iil.UnifiedRecordId__c
    GROUP BY Customer_Id__c
    ```
    
    This calculated insight contains one record per unified individual. It shows how often each person appears as a contact, lead, and account; and how often they appear across multiple orgs. To work, it requires the Account, Contact, and Lead objects that are installed as part of the Sales Cloud starter bundle. It also requires that the identity resolution process has been run successfully.
6. To check whether your SQL expression is valid, click **Check Syntax**. If it isn’t valid, you can’t continue. Double-check your expression and try again.
7. Click **Activate**.
8. From the Schedule dropdown, select **Not Scheduled.**
9. Click **Enable**.
    
    You can schedule a calculated insight, but for these use case examples, run them one time manually.

The calculated insight appears on the record home page.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_note.png)

Note To learn more about creating insights in Data Cloud, take the trail [Enhance Data in Data Cloud](https://trailhead.salesforce.com/content/learn/trails/enhance-data-in-customer-data-platform).

## View in Data Explorer

In Data Explorer, you can view selected Data Cloud data from your data lake objects (DLOs), data models objects (DMOs), calculated insight objects (CIOs), or data graphs.

1. Go to the **Data Explorer** tab in Data Cloud.
    
    If you don't see Data Explorer, contact your admin to enable the [permissions](https://help.salesforce.com/s/articleView?id=data.c360_a_enable_data_explorer_permissions.htm&type=5&language=en_US).
2. Select the appropriate data space and then select **Calculated Insights** from the Object dropdown. Then search for the insight you created.