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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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}})

 

 


Regards
Zubair

Please try my custom visuals

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.

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}})

 

 


Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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