Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Merging Queries with same index numbers

Hey there,   Please bear with me, I am very new to Power Bi. I work in customer service survey data. I am creating a dashboard to visualize our survey data. I currently have 2 different data source...
  • nandic's avatar
    2 years ago

    Anonymous as you mentioned that these two sources have same column names and questions, do you want to merge these tables or to make union?

    Merge is used when you have same field in both sources and you want to keep source1 table, and just to add a few relevant columns from source2 table.
    Example: table1 is customer table without phone number, table2 is customer details with phone number. You want to merge this two tables based on customer id (which matches in these two tables) and just to add field "phone number" from table1 to table2.

    Union on the other hand is used when tables are the same, same structure, same columns.
    And you just want to combine them, to put all into 1 table, instead of 2 tables.
    Here is it is recommended approach to add new field in each table telling information about source (example: in source1 table you will add custom column with text "source1 table") so that you can use this information on the report.

    Merge requires common field between tables based on which tables have relationship.
    Union doesn't require common field, it requires same structure of tables.

    Cheers,
    Nemanja Andic