Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
betty_bui2602
Helper I
Helper I

MERGE TABLES WITH MULTIPLE ROW

Hello 👏

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

betty_bui2602_0-1675843348142.png

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

betty_bui2602_1-1675843404205.png

When i merge to second table, it repeat values 

betty_bui2602_2-1675843539275.png

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

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

 

 

1 ACCEPTED SOLUTION

Hi @betty_bui2602 ,

 

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)

RicoZhou_0-1675929557934.png

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

RicoZhou_1-1675929595189.png

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.

 

View solution in original post

6 REPLIES 6
Idrissshatila
Super User
Super User

Hello @betty_bui2602 ,

 

You could try to remove duplicates from the last table you made.

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




I would like to keep the duplicates :(, because i need Business Type colum for later works 

@betty_bui2602,

 

Then you could add a new index for all the table,

https://learn.microsoft.com/en-us/power-query/add-index-column

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




I read the article you shared. 
Can you explain a bit more the purpose of new index since i already have 1. 

Hi @betty_bui2602 ,

 

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)

RicoZhou_0-1675929557934.png

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

RicoZhou_1-1675929595189.png

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.

 

thank you very much @v-rzhou-msft. i able to achive my outcome follow the link you shared😍

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.