---
schema_version: "1"
id: a953adfcf77e9210241a72f60e1a7531d16292d25e4fd6daa5d7e8ef1bb34c79
title: Create a Calculated Measurement from a Widget
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/dato_measure_create_from_widget.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.dato_measure_create_from_widget.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e84ee2f5882ca1d20e2ffdb077a64c393be4237cb9c2c22632b79a72b45294a7
description: Create calculated measurements on top of existing data so you can refer to them across your workspace. Widgets can be used to display the calculated measurement data.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Create a Calculated Measurement from a Widget

Create calculated measurements on top of existing data so you can refer to them across your workspace. Widgets can be used to display the calculated measurement data.

### Required Editions

<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="text-align:center;vertical-align:top;" id="d74810e38">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d74810e38 ">To create and manage calculated measurements:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d74810e38 ">Power User or Admin</td>

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

1. On the **Visualize** tab, click a dashboard page.
2. Click the pencil icon to enter edit mode.
3. To add a widget, click the plus icon.
4. Select the widget type, and then click the plus icon to add a field.
5. Click the **Add Calculated Field** icon ![plus sign and a Greek capital sigma](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/add_calc_field_icon.png) , and then click **Calculated Measurement**.
6. In the **General** section, define the calculated measurement.
    
    When setting the decimal places, the more places you specify, the more exact the calculation.
7. In the **Advanced** section define advanced settings.
    1. For **Total Aggregation Function**, select the function to calculate the total value of a query. For example, SUM, AVG, MIN, or MAX. Values that appear in separate rows of a display are all aggregated in the Total row. The Total Aggregation Function and the Aggregation Function—set in the expression section— should be the same.
    2. Set the granularity—Determine the level the calculations for the measurement takes place.
    3. To let null values be used in the formulas, select **Treat Nulls as Zeros**
    4. To include the date in the granularity of the calculation, select **Include Date in Granularity**
8. In the **Expression** section, define the expression:
    1. Set the aggregation function to determine the calculation result for all the produced rows. When a granularity is set, the underlying calculation produces multiple calculation results for multiple rows. These rows must be aggregated into a single row of the displayed dimension.
    2. Create the expression that you want to base the calculated measurement on using the list of available measurements and functions. For example, if you want to calculate email open rate that uses email sends as the denominator instead of email deliveries, use this expression: `IFERROR([Email_Unique_Opens]/[Email_Sends], null)` The `IFERROR` function results in the calculated measurement returning null values when the email sends equal to 0.
    3. To add a function to your expression, click it, or start typing for auto-complete.
9. Click **Save**.