Create a Calculated Measurement

Create calculated measurements on top of existing data so you can refer to them in other tabs. You can also create calculated measurements from a widget on a dashboard page. Calculated measurements created from widgets appear in the calculated measurements section in the Setup tab.

Required Editions

Available in: Intelligence Reports Advanced
User Permissions Needed
To create, edit, and apply filters Create & Edit
Note
Note You can create up to 20 additional calculated measurements at one time per business unit. This number does not include the available pre-canned calculations.
  1. From Analytics Builder, select Intelligence [Datorama] Reports.
  2. In the Setup tab, expand Calculated Measurements, and click Create Calculated Measurement.
  3. Define your calculated measurement:
    In the General section:
    • Measurement Name – Enter a name for your measurement.
    • Type – Select the metric type, which is a numeric value, percentage, currency, or duration of time.
    • Decimal Places – Select the number of decimal places in the measurement. The more decimal places you choose, the more exact the number is.
    • Color – Select the color in which the calculated measurement appears in your collections.
    • Description – Enter a description of the calculated measurement.
    In the Advanced section:
    • Total Aggregation Function – Defines what function is used 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.
    • Granularity – Determine the level the calculations for the measurement takes place. You can select a granular level that isn’t included in the widget. For example, when setting the granularity to Job ID, even if you’re visualizing the measurement at the Campaign Key level, the calculation still occurs at the job level.
    • Treat Nulls As Zeros – To turn null values into zero, select this checkbox. This selection allows nulls to be used in the formulas.
    • Include Date in Granularity – When it’s in the query, to include the date in the granularity of the calculation, select this checkbox.
    • Invisible Measurement – To hide widgets containing this measurement from users that aren’t admins, select this checkbox.
    In the Expressions section, insert the expression you want to base the calculated measurement on. 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 equals 0.
    • Aggregation Function – The Aggregation Function determines 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. When setting a granularity, you must define how the system performs this aggregation, for example, SUM, AVG, or MAX. On the right- hand side menu, use the list of available dimensions, functions and measurements to create your expression. Click on a field to add it to your expression or start typing for auto-complete. You can use any of the available functions together with any of your available fields.
    • Code Validation – Check to see if your code is valid (doesn’t include syntax errors).
    • Test – Click to make sure that your code works and the data is extracted correctly.
  4. Save your calculated measurement.