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, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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