Unions (CX)
Qtip: The data modeler and related functionality is not yet available to all customers. If you’re interested in this feature, please reach out to your XM Success Representative. Qualtrics may, in its sole discretion and without liability, change the timing of any product feature rollout, change the functionality for any in preview or in development product feature, or choose not to release a product feature or functionality for any reason or for no reason.
About Unions
In a data model, unions let you combine multiple data sources together into a single dataset. Rather than combining individual rows of data, as you do in a join, you simply add more rows to the same dataset.
Understanding Unions
To understand unions, let’s look at a few examples.
Example 1
We ran the same NPS survey in 2019 and in 2020. We create a union between these 2 surveys, and now we can report on both of their data in the dashboard.
If we want to create a widget that shows average NPS performance, we can do that with NPS data from both surveys.
2019 Survey Data
NPS Score | Department |
10 | Clothing |
9 | Electronics |
7 | Housewares |
2020 Survey Data
NPS Score | Store |
5 | Toronto |
6 | Raleigh |
9 | Seattle |
Resulting Dataset
NPS Score | Department | Store |
10 | Clothing | Null |
9 | Electronics | Null |
7 | Housewares | Null |
5 | Null | Toronto |
6 | Null | Raleigh |
9 | Null | Seattle |
Example 2
We ran an NPS survey in 2019 and in 2020. However, each year, we added and removed a few different questions. Still, when we create a union between these 2 surveys, we can report on both of their data in the dashboard.
If we want to create an average NPS widget, we can do that with NPS data from both surveys, because they share this data in common.
If we also want to report on Departments, we can add another widget to our dashboard. However, it’s important to note that this widget will only have data for 2019, because there is no department data for the 2020 survey.
2019 Survey Data
NPS Score | Department |
10 | Clothing |
9 | Electronics |
7 | Housewares |
2020 Survey Data
NPS Score | Store |
5 | Toronto |
6 | Raleigh |
9 | Seattle |
Resulting Dataset
NPS Score | Department | Store |
10 | Clothing | Null |
9 | Electronics | Null |
7 | Housewares | Null |
5 | Null | Toronto |
6 | Null | Raleigh |
9 | Null | Seattle |
Creating Unions
- Create a data model.
- Add at least 2 sources to your data model.
- Click the plus sign ( + ) next to the first source you want to add to the union.
- Select Union.
- Name the output. This is helpful if you plan to add multiple unions to your dataset.
- The Input is the first source you want to add to the union.
- Under Union with, select the sources you want to add to the union.
Qtip: Click the plus sign ( + ) to add more sources to the union.
- Under Field editor, check that your fields and their types look correct.
Qtip: See Mapping, Merging, and Separating Fields for more details. - You can add more sources to create additional unions (optional).
- Finish building your output dataset.
Mapping, Merging, and Separating Fields
When you map data, you decide the specific survey questions and metadata that relate back to your dashboard data. As you create a union, similar questions from different surveys will map back to the same dashboard field.
A lot of fields are mapped automatically based on detected similarities. However, it’s always best to double-check the data for accuracy.
All data mapping happens in the Field editor tab.
- All the sources in your union will appear side-by-side. Note how each survey is its own column.
- Each row represents a separate field. Use the drop-down list under each survey to choose the survey field that matches the dashboard field.
Example: In this row, the CSAT 2019 and Satisfaction Data surveys have questions mapped to the Solution with resolution field. CSAT 2020 is not mapped to this field.
- Under Destination, you’ll see the name of the dashboard field all of these sources connect to.
- Under Type, you can determine the type of data (e.g., numeric, text, scale), which then lets you express your data with different widgets. See Field Types & Widget Compatibility (CX) for more.
You do not have to map every source to every field; it is ok to leave items unmapped. You can merge data from multiple sources into the same field or keep the data separate as needed.
Adding a New Field
You can add a new field to your union, the original source, and any joins you have in your data model. If you’re adding a new field, you need to make sure you add it to every node in the model.
For more detailed steps, see Adding a New Field.