Oz du Soleil addresses the common need to bring two data sets together into one by stacking them up—formally called appending data. But the additional challenge is how to deal with it when the column headers don't match. See how easily this is done in Get
- Now I'm going to show you what happens when we try to append the data sets that have mismatched headers. Here we have two data sets that represent two sessions of mandatory fund that our company hosted, and we would like one big list to find out who participated. But notice, the department column names are mismatched. In session one, department is abbreviated, and in session two department is fully spelled out. Let's create queries and see what happens. The data sets are already in tables.
With my cursor inside the session one data set, go to from table, close and load as a connection only, load it, and notice on the right side, the session one query is loaded as a connection only. Let's make the session two query. Select a data set, from table. Here's our data. Close and load it as a connection only.
Now let's do the append. Let's go to data. New query. Combine queries. Append. Let's put session one on top, session two on the bottom. Okay. Notice, we have a D-E-P-T column and a department column. Append did not like that. To correct this, we need to change one or the other. So let's open the queries pane here. Let's go to session one. And let's fully spell out department.
Enter. Now, let's go to the append, and notice now we have one column called department. Let's close and load because that's exactly what we wanted. Here's our data. And now you see what happens when we try to append data sets when the column headers don't match exactly. So that's one thing that you need to be aware of when you do appends in get and transform.
- What is Get & Transform?
- Querying data
- Working with columns
- Using formulas
- Pivoting and unpivoting data
- Grouping data
- Appending a query
- Merging/combining data with joins