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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
KENNEU
Regular Visitor

Column of many values to a single comma separated string

I'm trying to collapse a single column of data into a comma separated string in power querty.  I can do it with group by if first get a count (they are all ones as they are all unique values) but it adds extra steps that slow things down.  I'm assuming I can get there from here with a single custom column.  Essentially:

From:

System Name

ABC123

12345

2345XYZ

 

To:

ABC123 , 12345 , 2345XYZ

 

I'm doing a bunch of work to get the list down to something that is pasted into another system that "processes" the comma-delimited list.  It is generally 600-1000 entries.

1 ACCEPTED SOLUTION
dufoq3
Super User
Super User

Hi @KENNEU, add this as new step (replace Source in my code with your previous step reference if needed):

 

= Text.Combine(Source[System Name], " , ")

 

Whole code:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnRyNjQyVorViVYC0iamYBaIEREZpRQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"System Name" = _t]),
    Cobimed = Text.Combine(Source[System Name], " , ")
in
    Cobimed

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

2 REPLIES 2
dufoq3
Super User
Super User

Hi @KENNEU, add this as new step (replace Source in my code with your previous step reference if needed):

 

= Text.Combine(Source[System Name], " , ")

 

Whole code:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnRyNjQyVorViVYC0iamYBaIEREZpRQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"System Name" = _t]),
    Cobimed = Text.Combine(Source[System Name], " , ")
in
    Cobimed

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

jgeddes
Super User
Super User

You can try the following code to see if it solves your concern...

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnRyNjQyVorViVYC0iamYBaIEREZpRQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"System Name" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"System Name", type text}}),
    Custom1 = Table.FromList(Table.ToList(Table.Transpose(#"Changed Type"), Combiner.CombineTextByDelimiter(",")), Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
    #"Converted to Table"







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors