Forum Discussion

Analitika's avatar
Analitika
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Merging tables in Power BI

Hi,

 

Having issue with merging tables in Power BI. 

One table.

 

Another table:

I wanted to merge two tables by column obj, but unfortunately it makes many duplicates in main table. Also first table date column not contains data in 2023 as like in second table. So how to properly merge tables?

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Analitika ,

    You can try the following:

    1. After merging two tables, do not expand the information of the other table.

    Add an index column: Add Column – Index Column – From 1.

    2. Expand your merged column.

    3. Since the values in the "index column" were purely unique, now Remove duplicates using index column.

    4. Results no longer contain duplicate values.

    If you need pbix, please click here.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • To do so, follow these steps:
    From the left pane of Power Query Editor, select the query into which you want the other query to merge.
    Select Merge Queries > Merge Queries from the Home tab on the ribbon. 
    Select State from the RetirementStats table, then select the StateCodes query.
    Select OK.

     

     

    Regards,

    Will

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Analitika ,

    You can try the following:

    1. After merging two tables, do not expand the information of the other table.

    Add an index column: Add Column – Index Column – From 1.

    2. Expand your merged column.

    3. Since the values in the "index column" were purely unique, now Remove duplicates using index column.

    4. Results no longer contain duplicate values.

    If you need pbix, please click here.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.