Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

Step-by-step - Combining tables using forced concatenation

This step-by-step walkthrough shows how you can use forced concatenation to combine two similar data tables.

Forced concatenation can be used to clean up your data before you use it for analysis in a sheet. You can concatenate two tables into one table. You can also add another table later, for example if you initially add a table from June, and then later want to add a second table from July.

Concatenation at a glance

  • Tables are automatically concatenated in Data manager when Qlik Sense detects that one or more added tables have both the same number of fields and identical field names as another table. In this case, you can split the tables if needed.
  • Two tables can be force concatenated when tables do not entirely share the same fields or data. Only two tables can be force concatenated. To concatenate three tables, for example, concatenate the first two tables into one table. Concatenate the third table to that created table.
  • Tables that are not similar enough will not automatically be concatenated. You also will not be able to forcibly concatenate them. In this case, the fields in the table should instead be associated in the Data manager.

Walkthrough - Forced concatenation

These are the tasks required to complete the walkthrough:

  1. Prepare the data tables
  2. Add data tables to an app
  3. Concatenate and load data tables into an app
  4. A step further - adding a new table and concatenating the data fields

Prerequisites

You should know how to create an app in Qlik Sense. For more information, see Creating apps and adding data.

Prepare the data tables

We have supplied some sample data for you to use to demonstrate forced concatenation. You can also use your own data, provided the fields and data are mostly the same in your two tables.

For example, here is the header and first row of the data that we supplied below. It has been pasted into two Excel tables. Note the differences in the fields.

Excel tables.

If you want to use the sample data, expand the section below, and copy the tables, including the column headings, into two separate tabs in an empty Excel file on your computer. For this walkthrough, we named the Excel tabs Data Table 1 and Data Table 2. We named the Excel file Concatenate_Data.xlsx.

Add data tables to an app

  1. Start Qlik Sense.
  2. Click Create new app in your work area. The Create new app window opens.
  3. Name your app, and then click Create. The app is created. We named our app ConcatenateExample
  4. Click Open app. The app opens and displays a dialog where you can add data.
  5. Drag and drop your Excel file into the Add data from files and other sources dialogue. Your tables are displayed in the Associations view of the Data manager. Click a bubble to see the data for that table.

    Information noteIf you add data instead from Data manager, you will first be asked to select table fields before being taken to the Associations view of the Data manager. In this case, select all the fields for both tables.

    Associations view with two bubbles.

Concatenate tables and load data tables into an app

After the data tables have been added to the app, the tables can be concatenated.

  1. In the Associations view of Data manager, select one table by clicking the bubble. Click More and then select Concatenate or join.

    Associations view with option Concatenate tables.

  2. Click the bubble for the other table, and then click Edit mappings.

    Associations view with option Edit mappings

  3. You can now do the following as required:

    1. In Table name, rename the table that will be created when you combine the tables.
    2. Combine fields by dragging and dropping field labels.
    3. Rename fields.
    4. Delete fields by clicking Cancel for the field.

    Edit mappings view with several options.

    In our example, we did the following:

    1. Renamed our table to Data Table.
    2. Dragged the ProductID label and field to below the PID field, to combine the fields.
    3. Renamed the PID field to Product ID.
    4. Deleted the SpecialOfferID field.

    Our table now looks like this:

    Edit mappings view with the result after editing.

  4. In the Selection action drop-down, click Concatenate, and then click Apply. The tables are concatenated on the mapped fields. The * indicates that the data has not yet been loaded into the app.

    Table 'Data Table' with an *.

  5. Click Load data. A message is displayed indicating that the data was loaded successfully. Click Edit sheet to create visualizations using the data.

A step further - adding a new table and concatenating the data fields

The sample data provided above was pasted into two tabs in the same Excel file. However, the tables do not need to be in same file when you want to concatenate fields. The tables can be in separate files that are added to the app. Another table can also be added later, for example if you initially add a table from June, and then later want to add a second table from July.

In this example, we add another table with similar fields to the concatenated table we created above.

Here is the sample data. We named the tab that contains the table DataTable_Newest. We named the data file Concatenate_Data2.xlsx.

  1. From the Analytics activity center, click the app that you created in the procedures above. The app opens.

  2. Select Data manager from the drop-down list in the top toolbar. The Data manager opens and the table you created in the procedure above is shown.

    Data manager with bubble 'Data Table'.

  3. Click the Add button to add data.
  4. Click Data files in the left menu, and then click DataFiles under Folder shortcuts. Upload your new data file.

  5. Select the file. The Add data window opens.
  6. Click Add data to add the data table to the app.

    The new table is added to your app.

    Associations view with two bubbles.

  7. You can now concatenate the tables, edit the mappings, and then load the data.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!