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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
novicepowerbi
New Member

Copy paste specific rows from one table to another table based on matching value

Hi, 

 

I am very new to this. 

 

  • I have 2 tables: 'Summary Table' and 'Details Table'
  • There are cells from 'Details Table'[ACTIVITY ID] that match in 'Summary Table'[SUMMARY ACTIVITY CODE]
  • I want to copy-paste the complete rows that have matching cells from 'Details Table' to 'Summary Table', but also insert the copied rows under the respective match.

Sample arbitrary data:

novicepowerbi_0-1707792937899.png

 

Desired outcome:

novicepowerbi_1-1707792962750.png

I am able to combine the two tables with only the rows with the matching cells but i cant insert them where I want to be automatically.

 

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_2.pngScreenshot_3.pngScreenshot_4.png

View solution in original post

3 REPLIES 3
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_2.pngScreenshot_3.pngScreenshot_4.png

This does it for I need for now! Thank you so much!

Ritaf1983
Super User
Super User

Hi @novicepowerbi 
You can get the desired result by those steps :
1. merge details with summary table, by activity id :

Ritaf1983_0-1707794313713.png

after this step, you will have just needed rows from the details table, so you can delete the newly created column

Ritaf1983_1-1707794421307.png

next step is just to append the tables

Ritaf1983_2-1707794556855.png

result:

Ritaf1983_3-1707794656683.png

Note that you cant delete unnecessary table because of merge , so you can just not to load it to the model

Ritaf1983_4-1707794787401.png

Pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.