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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Locco
Helper III
Helper III

Merge names in a row

I need to merge names in a single row and I have been having trouble getting this to work. I would like to do this without using DAX and to have it in query but I am open to a DAX solution as well.

 

I have a column which lists three different machine names. I need to group two of the machines together.

 

Machine001

Machine002

Machine003

 

I would like a column to have 

 

Machine001 & Machine003

Machine002

 

I've tried various other similar solutions, but nothing is giving the expected result, or they just are not fit for my purpose.

 

Can anyone help me with this?

 

Thanks!

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Locco ,

 

Assume you have grouped the machines.

vjaywmsft_0-1651720151636.png

First add an index column to the table.

vjaywmsft_1-1651720170947.png

Then select the index column and use pivot feature.

vjaywmsft_2-1651720301059.png

At last, merge the selected columns(under Add column tag) and delete unneeded columns.

vjaywmsft_4-1651720576863.png

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @Locco ,

 

Assume you have grouped the machines.

vjaywmsft_0-1651720151636.png

First add an index column to the table.

vjaywmsft_1-1651720170947.png

Then select the index column and use pivot feature.

vjaywmsft_2-1651720301059.png

At last, merge the selected columns(under Add column tag) and delete unneeded columns.

vjaywmsft_4-1651720576863.png

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
parry2k
Super User
Super User

@Locco what is the logic to combining machine 1 and machine 3?

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

The machines have a combined waste limit. So both machines together cannot exceed X amount of waste. I have no real way of splitting up the waste limit because it's not equally divided between the machines. If I group the machines on this table then their waste is combined and I can compare that against their limit. I have a seperate table with the waste limits and that table has the machines grouped. I figured the easiest option was to group the machines on this table and create a relationship between the two tables.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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