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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

add rows in a blank table with comma separated values from another table

I have a table1 as below and it has around 20k rows. I want to create another table2 where every 3 rows of table1 will be added as comma separated value in one row in table2.

 

Table1

org name      id

test                1

test                2

test                3

test                4

test                5

test                6

 

Table2

org name      id

test              1,2,3

test              4,5,6

1 ACCEPTED SOLUTION
Anonymous
Not applicable

This will work:

 

Custom1 = Table.Split(PriorStepName, 3),
#"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "Org ID", each Table.FirstValue([Column1]), type text),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Values", each [Column1][Index]),
#"Removed Columns2" = Table.RemoveColumns(#"Added Custom1",{"Column1"}),
#"Extracted Values" = Table.TransformColumns(#"Removed Columns2", {"Values", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
#"Extracted Values"

 

--Nate

watkinnc_0-1621924651206.png

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This will work:

 

Custom1 = Table.Split(PriorStepName, 3),
#"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "Org ID", each Table.FirstValue([Column1]), type text),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Values", each [Column1][Index]),
#"Removed Columns2" = Table.RemoveColumns(#"Added Custom1",{"Column1"}),
#"Extracted Values" = Table.TransformColumns(#"Removed Columns2", {"Values", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
#"Extracted Values"

 

--Nate

watkinnc_0-1621924651206.png

 

Anonymous
Not applicable

@Anonymous  Thanks. you saved the day

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.