Merging Tables

  • Last update:  2023-10-16
  • Overview

    Application Scenarios

    Merging tables is to merge several different but associated tables into one large table.

    There are two merging types — Union All and Join.

    Union All merges rows from different tables, as shown in the following figure.

    11.png

    Join merges columns from different tables, as shown in the following figure.

    1.1-2.png

    Join includes four modes — Left Join (retaining all the data from the left table), Right Join (retaining all the data from the right table), Full Join (retaining all the data from both tables), and Inner Join (retaining the data that has matching values in both tables).

    Implementation Method

    In FineBI, columns/fields with the same name are merged into one by default.

    This document introduces the effects, procedures, and check items of Union All and Join.

    Union All

    Preview

    The effect of Union All is shown in the following figure.

    2.1.png

    Function Entry

    Click Union All on the data processing page to merge rows from different tables.

    Procedures

    For details, see Proportion Analysis for Multiple Indicators.

    Sample data: Student Scores.zip 

    Create an analysis subject and upload the sample data. Select Student Scores (Sheet 1) and merge it with Student Scores (Sheet 2) through Union All.

    22.gif

    You can choose multiple tables in batch to be merged.

    For example, you can merge three Excel tables at one time.

    Columns/fields with the same name are merged into one by default. For consistent columns/fields with different names, you need to manually choose the fields to be merged.

    Take the following figure as an example, the names of the columns referring to students' names from two tables are different. The one in Student Scores (Sheet 1) is Name2 and that in Student Scores (Sheet 2) is Name1.

    Modify the merge fields of both tables to merge Name2 of the current table and Name1 of the table Student Scores (Sheet 2) into one, and rename the merged result to Name.

    33.gif

    Join

    Preview

    Join involves two tables. The left table is the one previewed on the data processing page and the right table is the one selected in the pop-up window after you click Join.

    Different Join modes present different joining effects. For details, see section "Description of Join".

    3.1.png

    You need to set a Merge Basis for Join, such as the Name field in the above figure.

    Description of Join

    Left Join

    • Left Join: joins all data from the left table and the data in the right table that has matching values in the left table.

    • Function entry: Join > Left Join.

    • Implementation effect: Left Join retains all data from the left table and the data in the right table that has matching values in the left table, and deletes the rest.

    • Description: The left table is the one previewed on the data processing page and the right table is the one selected in the pop-up window after you click Join. By default, the Merge Basis is the field in both tables. Values corresponding to the Merge Basis in both tables are joined together. For consistent fields with different names, you need to manually choose the fields to be merged and modify the Merge Basis. For consistent fields that do not need to be merged, you need to manually delete them.

    3.2.1.png

    Right Join

    • Right Join: joins all data from the right table and the data in the left table that has matching values in the right table.

    • Function entry: Join > Right Join.

    • Implementation effect: Right Join retains all data from the right table and the data in the left table that has matching values in the right table, and deletes the rest.

    • Description: The left table is the one previewed on the data processing page and the right table is the one selected in the pop-up window after you click Join. By default, the Merge Basis is the field in both tables. Values corresponding to the Merge Basis in both tables are joined together. For consistent fields with different names, you need to manually choose the fields to be merged and modify the Merge Basis. For consistent fields that do not need to be merged, you need to manually delete them.

    3.2.2.png

    Full Join

    • Full Join: joins all data from both tables.

    • Function entry: Join > Full Join.

    • Implementation effect: Full Join retains all data from both tables, regardless of whether the data has matching values in the other table.

    • Description: The left table is the one previewed on the data processing page and the right table is the one selected in the pop-up window after you click Join. By default, the Merge Basis is the field in both tables. Values corresponding to the Merge Basis in both tables are joined together. For consistent fields with different names, you need to manually choose the fields to be merged and modify the Merge Basis. For consistent fields that do not need to be merged, you need to manually delete them.

    3.2.3.png

    Inner Join

    • Inner Join: joins the data that has matching values in both tables.

    • Function entry: Join > Inner Join.

    • Implementation effect: Inner Join retains the data that has matching values in both tables and deletes the rest.

    • Description: The left table is the one previewed on the data processing page and the right table is the one selected in the pop-up window after you click Join. By default, the Merge Basis is the field in both tables. Values corresponding to the Merge Basis in both tables are joined together. For consistent fields with different names, you need to manually choose the fields to be merged and modify the Merge Basis. For consistent fields that do not need to be merged, you need to manually delete them.

    3.2.4.png

    Function Entry

    Click Join on the data processing page to join another table.

    3.3.png

    Procedures

    Sample data: Subject Scores.zip

    The Math Scores table contains the math scores of students A, B, and D. The English Scores table contains the math scores of students A, B, and C. Join the two tables into one to include the scores of all students. To meet this requirement, set the Join mode to Full Join.

    For details, see Basic Functions of Join.

    3.4.gif

    To join more tables, you can click Join again to add another table.

    If the system fails to automatch the Merge Basis, you need to add it manually.

    3.4-2.gif

    Check Items

    Duplicate Data after Merging

    Problem:

    There are duplicate values after merging.

    For example, to calculate the consumption amount of users in each city, you can join the tables User Info and Order Info. After joining, there are three duplicate values of the User ID 20231011.

    4.1.png

    Cause:

    Each user has multiple delivery addresses, so the User ID field corresponds to multiple values in the User Info table.

    In this case, taking User ID as the Merge Basis (Primary key) leads to duplicate values.

    4.1-2.png

    Solution:

    To retain only one piece of User 20231011's data, you can use the Group Summary to calculate the average value of Order Amount.

    4.1-3.png

    Over-limit Data after Merging

    Problem:

    Problem 1: After data update, an error message occurs on the data preview page, indicating that the current data volume is too large.

    Problem 2: When the merged table is applied for further operation, an error message occurs, indicating that the current data volume is too large.

    4.2.png

    Cause:

    During table merging, the data volume of the merged table increases significantly. The default maximum data volume of a table is 1000000 rows.

    Solution:

    Admins can modify the Data Access Volume under System Management > System Setting > General.

    附件列表


    主题: Adding and Editing Data
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy