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
karimm
Helper II
Helper II

Combine values from column of list of records

Hi there

 

I have a table containing a column named "apps".

Each cell in the column contains a list of one of more records, where each record represents an app.

The record has a field named "name" containing the app name.

I would like to transform each list to a string that is the concatenated list of app names in that cell.

I could expand to new rows and then group by all other columns, but i believe there is a more elegant solution that is easier to maintain.

 

EXAMPLE:

apps

-----

list {[id=1,name=app1]}

list {[id=1,name=app1],[id=2,name=app2])

 

Desired result

apps

----------------

app1

app1,app2

 

Please help 🙂

 

P.S. i have seen the post below, but couldn't convert the solution to be list based.

Concatenate values from child records while expanding from merged query 

 

 

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

You can use an expression like this in a custom column

 

= Text.Combine(List.Transform([ColumnWithList], each _[name]), ", ")

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Employee
Employee

You can use an expression like this in a custom column

 

= Text.Combine(List.Transform([ColumnWithList], each _[name]), ", ")

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thank you so much!

I actually tried something very similar but I was trying to do the whole transformation in the same column without creating a new custom column.

 

Thanks again!

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.

Top Solution Authors
Top Kudoed Authors