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
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
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.