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
Anonymous
Not applicable

how to combine text in multiple rows- DAX

I have a table which contains employeess' self-evaluation (column "Achievement"). Is there a way to filter the data by employee and combine them into one measure?

 

text combine in DAX.PNG

 

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

If you just want to combine all rows into a single text measure, you can use concatonatex with a pattern like this. 

CONCATENATEX(filteredTable,filteredTable[Acheivement],", ")

 

the filtered table could be done in different ways, including just passing the table name and adding the employees name into the rows section of a matrix. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

7 REPLIES 7
MattAllington
Community Champion
Community Champion

If you just want to combine all rows into a single text measure, you can use concatonatex with a pattern like this. 

CONCATENATEX(filteredTable,filteredTable[Acheivement],", ")

 

the filtered table could be done in different ways, including just passing the table name and adding the employees name into the rows section of a matrix. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Hi Matt is there are way to get this to only Concatenate unique values? Thanks.

Replace "filteredTable" with VALUES(filteredTable[Column])



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

I got an error with the measure "a table of multiple values was supplied when a single value was expected". I did manage to solve this using a similar solution you provided below with the dimension table linked to the fact table. Thanks.

HI Matt. This was really helpful and your solution worked for me as well, but I have a different challenge.
Is there a way to concatenate each record only in which the QuestionText is the same?

In other words, concatenate the records when the QUESTIONTEXT is the same?
Ideally I would have two concatenated records, one for each record as a result

 

TheBIGuy_PBI_1-1681243613859.png

Any help is appreciated

 

 

You need a dimension table for your QuestionText (create that in Power Query

Join the dimension table to your fact table

Use the dimension table in the visual (shown above).  Now there is only 1 record per question text instead of 1 record per answer

rewrite your concatenatex to refer to the dimenstion table as the first parameter



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.
Anonymous
Not applicable

Thank you! That works perfectly. 

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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