Calculate Metric Task
About the Calculate Metric Task
The Calculate Metric task allows you to trigger a response to aggregate metrics observed in a dataset over a period of time. In other words, it provides a way to set up automated workflows based on trends or events you observe in experience data. The results of your calculate metric task can be used to trigger other tasks within your workflow. For example, you could use the calculate metric task to notify your marketing team’s Slack channel when your brand NPS dips by 10% within a period of a week, or you could create a follow-up ticket for your team if more than 100 opt-outs occurred from XM Directory within a week.
Setting Up a Calculate Metric Task
- Follow the linked directions to set up a scheduled workflow.
- Click the plus sign ( + ) and then Task to create a task.
- Select Calculate metric.
- Select your Data Source. Here, you’ll specify the data Source that contains your data, the Metric you’d like to calculate, and the Field to perform the calculation on.
- Source: The survey or dashboard that hosts the data you will be calculating your metric from. All of your available surveys and dashboards will appear in the dropdown.
Attention: If you are using a dashboard as your source, make sure that the dashboard has been visited at least once in the last 30 days. If it’s been close to 30 days since the dashboard was last visited, you will receive a warning message via email to the email address associated with your Qualtrics account.
- Metric: The type of metric you’ll be calculating based on. Choose from the following metric types:
- Count of records: Display response counts from the selected fields (i.e., number of respondents choosing a value in a five-point scale).
- Average: Exhibit the average value for a selected field.
- NPS: Net Promoter Score. Identify the Detractors, Passives, and Promoters from NPS questions.
- Field: The specific field or question you will be calculating your metric on. This field does not appear if you select “count of records” as your metric type.
- Source: The survey or dashboard that hosts the data you will be calculating your metric from. All of your available surveys and dashboards will appear in the dropdown.
- If desired, add Filters. This can be used if you’d like to have the metric calculate on a subset of your data. You can filter based on one of the data source’s survey questions or one of your survey’s embedded data fields. You can also filter based on Text iQ sentiments and topics. For more information on setting conditions in filters, visit Creating Conditions.
Attention: Some of the resources for condition building use examples in data filtering instead of Workflows. However, the logic behind these conditions are the same.Qtip: When setting up the choice field in your filter you have the option to use piped text from your selected survey. Piped text is only available for multiple choice questions and text entry questions.
- Choose the Calculation Type.
Available calculation types are:- Single time period: The metric will be calculated using data from the chosen time period.
- Comparison time period: The metric will be calculated using a comparison between your chosen time periods. The comparison time period is immediately prior to the single time period specified above.
Example: For example, if I want to calculate the average score over the past 2 weeks, I would select “Over the past day” for the single time period and “Previous 14 days” for the comparison time period.Qtip: Check out the graph inside the task for an example comparing these two time periods and the resulting calculation for each.
- Click Save.
Adding Subsequent Tasks & Conditions
After setting up your calculate metric task, add subsequent tasks and conditions in order to use the results of your calculations.
- If desired, click the plus sign ( + ) and then Conditions to create a condition underneath your calculate metric task.
- Click Condition to begin specifying your conditions.
- Click Select Condition Type and select Tasks.
- Click Select workflow to select the Calculate option.
- Click Select Option to select the desired calculation type.
- If desired, the plus sign ( + ) and select Task to add subsequent tasks to be triggered based on your calculate metric condition.
Qtip: Each task will be labeled with a unique ID (e.g., “T-ID 1,” “T-ID 2”) for easier identification and organization. If you add a calculate metric task after an email task, but you are piping the results of the calculate metric task into your email task, the tasks will be automatically reordered so that they are in the correct order.
When Calculate Metric Tasks Are Completed
All types of survey responses can cause changes to the metrics calculated in a calculate metric task. This will cause subsequent tasks to trigger under certain conditions.
- Single time period: If you configure your calculate metric task with the Change over a period of time option, this will be the output values from the initial time period you set in your task.
- Comparison time period: If you configure the calculate metric task with the Change over a period of time option, this is the group of output values from the second time period you set in your task.
- Absolute change: The aggregate data from the first time period subtracted from the aggregate from the second time period.
- Relative change (%): The aggregate data from the first time period subtracted from the aggregate from the second time period, divided by your aggregate from the second time period.
Troubleshooting Calculate Metric Tasks
This section has links to additional resources that can help you troubleshoot issues related to email tasks.
- Identifying Whether Calculate Metric Tasks Failed: Workflows reporting allows you to check on the status of tasks in your survey, and identify whether they succeeded. This troubleshooting tool is best for checking on issues on the task setup side, and will not help you dig deeper into email deliverability issues, such as invalid recipients.
- Troubleshooting Conditions: The way a condition on an task is worded can change when the task is executed. First, remember to check the general rules for who receives email tasks, and when. If you need help troubleshooting the way conditions are written, check out these resources:
- Creating Conditions (With step-by-step example)
- New Conditions and Condition Sets
- All vs. Any
- Nesting Logic