Create business account measures with measure builder

Create measures on the level of individual accounts (customer measure) or on the level of all accounts (business measure).

  • Customer measure: Generates output as its own table. Customer measures don't show in the customer profile card.

  • Business measure: Generates output as its own table and shows on the home page of your Dynamics 365 Customer Insights - Data environment.

Tip

If your B2B environment uses accounts with hierarchies, choose whether to aggregate the measure across related sub-accounts.

  1. Go to Insights > Measures.

  2. Select New.

    Empty configuration screen for a B2B measure.

  3. Select Edit details next to Untitled measure. Provide a name for the measure. Optionally, add tags to the measure.

    Edit details dialog box.

  4. Select Done.

  5. In the configuration area, choose the aggregation function from the Select function dropdown menu. Aggregation functions include:

    • Sum
    • Average
    • Count
    • Count Unique
    • Max
    • Min
    • First: takes the first value of the data record
    • Last: takes the last value that was added to the data record
  6. Select Add attribute to select the data to create this measure.

    1. Select the Attributes tab.
    2. Data table: Choose the table that includes the attribute you want to measure.
    3. Data attribute: Choose the attribute you want to use in the aggregation function to calculate the measure. You can only select one attribute at a time.
    4. Optionally, choose a data attribute from an existing measure by selecting the Measures tab, or search for a table or measure name.
    5. Select Add to add the selected attribute to the measure.
  7. To build more complex measures, add more attributes or use math operators on your measure function.

  8. To add filters, select the Filter in the configuration area. Applying filters will only use the records that match the filters to calculate the measure.

    1. In the Add attribute section of the Filters pane, select the attribute you want to use to create filters.
    2. Set the filter operators to define the filter for every selected attribute.
    3. Select Apply to add the filters to the measure.
  9. Select Dimension to choose more fields to add as columns to the measure output table.

    1. Select Edit dimensions to add data attributes you want to group the measure values by. For example, city or gender.

      Tip

      The CustomerId attribute is already added indicating this is a customer level measure type. If you remove the attribute, the measure type changes to business level.

    2. Select Done to add the dimensions to the measure.
  10. If there are values in your data that must be replaced with an integer, select Rules. Configure the rule and make sure that you choose only whole numbers as replacements. For example, replace null with 0.

  11. If you use accounts with hierarchies, review Roll up sub-accounts.

    • To calculate the measure for every account, select No. Every account gets its own result.
    • To calculate one result, select Yes. Select Edit to choose the account hierarchy according to the ingested hierarchies and select Apply. The measure yields only one result because it's aggregated with sub-accounts.
  12. If there are multiple paths between the data table you mapped and the Customer table, choose one of the identified relationship paths. Measure results can vary depending on the selected path.

    1. Select Relationship path and choose the path that should be used to identify your measure. If there's only a single path to the Customer table, this control won't show.
    2. Select Done to apply your selection.
  13. Select the vertical ellipsis (⋮) on the calculation to Duplicate or Remove a calculation from a measure.

  14. In the Preview area, you'll see the data schema of the measure output table, including filters and dimensions. The preview reacts dynamically to changes in the configuration.

  15. Select Run to calculate results for the configured measure. Select Save and close if you want to keep the current configuration and run the measure later. The Measures page displays.