---
schema_version: "1"
id: bb7f317572b31cf5640301528513fb7eb7dd4b8de9b59e1849471f6afefdb679
title: Create a Case Closure Calculated Insight
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/search_es_SA_case_closure_CI.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.search_es_SA_case_closure_CI.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7be871a93cde2eb208bbac1742171b83a2182033ffbe86940e8ccc5d56d63020
description: Create a calculated insight (CI) with case-related metrics by using example SQL expressions. Use the CI to see how many interactions happen before the case is closed, to analyze case-related metrics, and to build dashboards.
products:
  - Cross Cloud
release: "264"
---
# Create a Case Closure Calculated Insight

Create a calculated insight (CI) with case-related metrics by using example SQL expressions. Use the CI to see how many interactions happen before the case is closed, to analyze case-related metrics, and to build dashboards.

### 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 Cloud. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;type=5&amp;language=en_US" target="_blank">Data Cloud edition availability</a>. Search Analytics isn't available in Government Cloud.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="vertical-align:top;" id="d40847e57">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d40847e57 ">To create calculated insights:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d40847e57 ">Data Cloud Admin</td>

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

To create your CI, use the Search Analytics data model objects (DMOs) and a DMO on case closures.

1. Enable Search Analytics from Einstein Search settings.
    
    See [Enable Search Analytics](https://help.salesforce.com/s/articleView?id=ai.search_es_enable_search_analytics.htm&release=264.0.0&type=5 "To use Search Analytics, you need a Data Cloud license and Data Cloud credits. To include user data in Search Analytics, you must first enable search analytics.").
2. Create a custom DMO with information on case closures.
    
    See [Create a Custom Data Model Object](https://help.salesforce.com/s/articleView?id=data.c360_a_create_custom_data_model_object.htm&type=5&language=en_US). The DMO needs columns with the API names CaseId, IsClosed, and ClosedDate.
3. Create a calculated insight with the example SQL.
4. Copy and paste the example SQL for the metrics you want to collect. Replace the bolded text in each example with the API field names of your case closure DMO.
    
    See [Cases Closed by Interaction Type](https://help.salesforce.com/s/articleView?id=ai.search_es_case_closure_exp1.htm&release=264.0.0&type=5 "Use this example SQL for percent and total cases closed by interaction type.") and [Cases Closed by Number of Searches.](https://help.salesforce.com/s/articleView?id=ai.search_es_case_closure_exp2.htm&release=264.0.0&type=5 "Use this example SQL for percent and total cases closed by number of searches.")

After you publish the CI and it runs for the first time, see data in the Data Explorer tab or use the CI to create dashboards.

- **[Example: Cases Closed by Interaction Type](https://help.salesforce.com/s/articleView?id=ai.search_es_case_closure_exp1.htm&release=264.0.0&type=5)**  
    Use this example SQL for percent and total cases closed by interaction type.
- **[Example: Cases Closed by Number of Searches](https://help.salesforce.com/s/articleView?id=ai.search_es_case_closure_exp2.htm&release=264.0.0&type=5)**  
    Use this example SQL for percent and total cases closed by number of searches.

#### See Also

- [Create a Custom Data Model Object](https://help.salesforce.com/s/articleView?id=data.c360_a_create_custom_data_model_object.htm&type=5&language=en_US)
- [Create a Calculated Insight Using SQL](https://help.salesforce.com/s/articleView?id=data.c360_a_get_started_with_calculated_insights.htm&type=5&language=en_US)