Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

MERGE TABLES WITH MULTIPLE ROW

Hello 👏

I tried to merge tables to 1. I have unique KeyID column which not contain Duplicate. 

After i expand table you can see that i have multiple channels. 

When i merge to second table, it repeat values 

Can you give me solution how to keep only first index?

Thank you in advance 😉 
amitchandak v-jingzhang v-yalanwu-msft 

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    According to your statement, I think you want to keep the first index per Key ID. Here I suggest you to add a new index column before you expand your table.

    Add a custom column in your table.

    Table.AddIndexColumn([MTD ATT],"New Index",1)

    Then remove old [MTD ATT] and expand [New MTD ATT].

    Then you can merge your tables and keep first index.

    For reference: Create Row Number for Each Group in Power BI using Power Query

     

    Best Regards,
    Rico Zhou

     

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

     

6 Replies