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
pbrainard
Helper III
Helper III

Concatenate three columns then split into rows

I need to concatenate these three columns, separated by delimiter. Sometimes there will only be one ID, sometimes two, and sometimes three. If there is no ID, it's a null value.

pbrainard_0-1638827233705.png

Here is what I'm doing to attempt this:

= Table.AddColumn(#"Renamed Columns", "Text.Combine", each Text.Combine({[Employee ID],[Employee ID2],[Employee ID3]},"; "))

 

but as you can see, I'm getting errors in the newly created column. Here's the error:

 

pbrainard_2-1638827419873.png

 

Once the combined column is created, I'll need to create duplicate row for each line with a ID2 and ID3.

 

Please help. This seemed like it should be straight-foward but, apparently not.

Thanks!!!

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @pbrainard 

 

The IDs are Number, not Text, try

= Table.AddColumn(#"Renamed Columns", "Text.Combine", each Text.Combine((List.Transform({[Employee ID],[Employee ID2],[Employee ID3]}, Text.From), "; "))

View solution in original post

2 REPLIES 2
pbrainard
Helper III
Helper III

Needed another ) after Text.From, but works like a charm. Thank you!!!

 

Vera_33
Resident Rockstar
Resident Rockstar

Hi @pbrainard 

 

The IDs are Number, not Text, try

= Table.AddColumn(#"Renamed Columns", "Text.Combine", each Text.Combine((List.Transform({[Employee ID],[Employee ID2],[Employee ID3]}, Text.From), "; "))

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.