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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
TheBIGuy_PBI
Helper II
Helper II

Trying to merge a column into one row

Hi, I'm trying to take a table and merge the "Answers combined" into one row, grouped by the QuestionText.  It's probably easier than I think but everything I try has not worked.  

Any help on this would be really appreciated.  I've been able to use the ConcatenateX function in PowerQuery, but it just combines everything.  I'm trying to combine them by QuestionText.

A few guys here have helpful, taking me part of the way, but this is the step where I'm stuck

Any help is appreciated.

TheBIGuy_PBI_0-1681304765997.png

Thanks, Steve

1 ACCEPTED SOLUTION
barritown
Solution Sage
Solution Sage

Hi @TheBIGuy_PBI

I guess you need such a measure:

barritown_0-1681331676621.png

Here it is in the text format for convenience:

 

Merged = CONCATENATEX ( data, data[Answer], UNICHAR(10) )

 

The same option works if you want to create a separate table with the merged answers:

Table with Merged Answers = 
SUMMARIZE ( data, data[Question], 
            "Merged Answers", CONCATENATEX ( data, data[Answer], UNICHAR(10) ) )

 

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

View solution in original post

2 REPLIES 2
barritown
Solution Sage
Solution Sage

Hi @TheBIGuy_PBI

I guess you need such a measure:

barritown_0-1681331676621.png

Here it is in the text format for convenience:

 

Merged = CONCATENATEX ( data, data[Answer], UNICHAR(10) )

 

The same option works if you want to create a separate table with the merged answers:

Table with Merged Answers = 
SUMMARIZE ( data, data[Question], 
            "Merged Answers", CONCATENATEX ( data, data[Answer], UNICHAR(10) ) )

 

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

Holy sh**! This worked perfectly.  I took your suggestion and modified it, but your solution was the perfect template for me to get my project done.

I was able to complete the project with this code and some formatting to get the job done.

Treemap2 = SUMMARIZE (
            'Treemap', Treemap[QUESTIONTEXT],
            "Merged Answers", CONCATENATEX ( Treemap, Treemap[Answers Combined],
            UNICHAR(10) )
            )

Appreciate your help!!!!




Can't thank you enough for your help!!!!!!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.