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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Concatenate text stored in several rows

Hey,

I have a table, where the full text string is splitted up into different rows. Here is an example:

 

ID       Entry No.      Text

001     0001             This is a long

001     0002             text which is stored

001     0003             in 3 rows.

002     0001             This is another 

002     0002             example 

....        ....                 ....

 

What I want to retrieve is "This is a long text which is stored in 3 rows.", "This is another example".

Number of rows per text string varies from 1 to 7.

 

Any suggestion how to concatenate these values?

 

BR    Uli

1 ACCEPTED SOLUTION

Hey,

No worries at all, my bad I miss read your question, please find an updated soultion below:

Test = CALCULATE(CONCATENATEX('Table','Table'[Text]," "),FILTER('Table','Table'[ID]=001))

 

cursed_5-1681998803979.png
My Data:

cursed_0-1681998246315.png

My Forumla:

cursed_1-1681998285427.png


My Table:

cursed_2-1681998310380.png

 

View solution in original post

5 REPLIES 5
cursed
Frequent Visitor

Hey,

If you use the following command, 

Test = CONCATENATEX('Name of your data table','Name of your data table'[The Row you want to merge],"Delimeter this is what appears between each row for example if you set this to "-" you'll get 1-2-3")

My Data Table
cursed_0-1681983863604.png


My Dax Forumla:

cursed_1-1681983910599.png


My Table:

cursed_3-1681984091455.png


Let me know if you have any furhter questions,
Many Thanks
Ben

Anonymous
Not applicable

Hey Ben,

thanks for quick support. I think your proposal is in right direction, but I still need help: Your example merges all values in column [Test]. I only want to merge those values which have the same ID in another column. In my example all values of column [Text] which share identical value in column [ID] sorted by column [Entry No.].

I'm quite new to Power BI, but I do not see, that your formula resolves that issue. Sorry.

 

BR   Uli

 

Hey,

No worries at all, my bad I miss read your question, please find an updated soultion below:

Test = CALCULATE(CONCATENATEX('Table','Table'[Text]," "),FILTER('Table','Table'[ID]=001))

 

cursed_5-1681998803979.png
My Data:

cursed_0-1681998246315.png

My Forumla:

cursed_1-1681998285427.png


My Table:

cursed_2-1681998310380.png

 

Anonymous
Not applicable

Thanks a lot - you made my day!

 

BR   Uli

 

Thank you, happy that I could help 🙂

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.