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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
lravikiran
Helper I
Helper I

Convert multiple rows of text into single row with delimiters in Power Query

Hi Experts,

 

I have a requirement where Sponsor(Data Type - Text) field is distinct for the given same combination of the Market + Process.

 

What I want as an output is a Distinct combination for Market + Process with the sponsors getting concatennated in a single rows with a , delimiter. and the Expected Savings getting aggregated (sum).

 

Please note I would need this in Power Query since I need to use it in excel as well.

 

Please refer to the Image :

 

Convert Rows into one row.PNG

 

Regards,

Ravi

1 ACCEPTED SOLUTION

@lravikiran 

 

Try adding this step in the formula bar of Query Editor.

Please see attached file as well

 

 

= Table.Group(#"Changed Type", {"Market", "Process"}, {{"Sponsor", each Text.Combine(_[Sponsor],",")}, {"Expected Savings", each List.Sum([Expected Savings]), type number}})

 

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Please try concatenatex

https://docs.microsoft.com/en-us/dax/concatenatex-function-dax

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks , but I need the solution in Query editor.

@lravikiran 

 

Try adding this step in the formula bar of Query Editor.

Please see attached file as well

 

 

= Table.Group(#"Changed Type", {"Market", "Process"}, {{"Sponsor", each Text.Combine(_[Sponsor],",")}, {"Expected Savings", each List.Sum([Expected Savings]), type number}})

 

 

Helpful resources

Announcements
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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.