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

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

Reply
Junaid11
Helper V
Helper V

Concatenate two rows based on different value in columns

Hello,

I want to combine two tables. Both table looks same except one or two columns are different in both of them. I want after combining if any of the row has same Person ID, Vendor ID, Name , Start Date and End Date then other rows of the similar rows should concate nate like below out come as mentioned:

My first table look like this:

Person IDNameVendor IDDescriptionStart DateEnd DateNext StepWork
123JamesA12A-Z18/01/202118/01/2021Go for next stepDone

My second table which is same except one other column different from above one is:

Person IDNameInfoVendor IDStart DateEnd DateNext StepWork
123JamesMagA1218/01/202118/01/2021Don't GoNot Done

I want my outcome to be:

Person IDNameVendor IDStart DateEnd DateNext StepWorkDescriptionInfo
123JamesA1218/01/202118/01/2021Go for next step,Don't GoDone,Not DoneA-ZMag

As you can see this new table has both columns which were different in both the tables as well as values which were different in the similar column with same Name , Person ID, Vendor ID , Start Date and End Date have been merged in to one in Next Step and Work column. Kindly help in getting this result.

Thanks

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

--> "After that, you can Merge Columns as required e.g. the Work column from each table."

You select both columns, right-click and choose Merge Columns

 

Follow the steps of my solution.

I will help if you are stuck.

View solution in original post

3 REPLIES 3
HotChilli
Super User
Super User

--> "After that, you can Merge Columns as required e.g. the Work column from each table."

You select both columns, right-click and choose Merge Columns

 

Follow the steps of my solution.

I will help if you are stuck.

HotChilli
Super User
Super User

Merge the Queries in Power Query. (on Person ID).

You can then Expand fields from the 2nd table to choose what you want to return.

After that, you can Merge Columns as required e.g. the Work column from each table

Hello @HotChilli ,

The main problem is concatenation. How to achieve that?

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.