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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
s-in-a-triangle
Frequent Visitor

merge tabseperated column values at once

Hi all,

 

My data looks like this:

 

columnid
|158|9978
|116|623|48724
|116|437|852|863|48344
|116|437|852|48337
|102|4744
 4746
|102|4747
|116|437|852|863|4755
 4845
|102|4846
 4856
|102|4882

 

I have another table where the column values are mapped to string values:

 

column_idvalue
102a
116b
158c
437d
623e
852f
863g

 

What I am looking to achieve is:

column_valuesissueid
c9978
b, e48724
b, d, f, g48344
b,d, f48337
a4744
 4746
a4747
b, d, f, g4755
 4845
a4846
 4856
a4882

 

How can I achieve this as efficient as possible?

 

I can split column by delimiter and then merge one by one, but this will get out of hand quickly.

 

  #"Split Column by Delimiter" = Table.SplitColumn(#"previous_step", "column", Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv), {"column.1", "column.2", "column.3", "column.4", "column.5", "column.6", "column.7", "column.8"}),

 

Anybody better ideas?

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @s-in-a-triangle 

 

Assuming TableNames are Table1 and Table2, try this custom column

It gives me correct results with sample data
See attached file's Query Editor as well

 

=let Replacements=Record.FromList(Table2[value],List.Transform(Table2[column_id],each Number.ToText(_)))
in
Text.Combine(List.RemoveItems(List.Transform(Text.Split([column],"|"), each Record.FieldOrDefault(Replacements, _, _)),{null,""}),",")

sinatriangle.png

 

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

Hi @s-in-a-triangle 

 

Assuming TableNames are Table1 and Table2, try this custom column

It gives me correct results with sample data
See attached file's Query Editor as well

 

=let Replacements=Record.FromList(Table2[value],List.Transform(Table2[column_id],each Number.ToText(_)))
in
Text.Combine(List.RemoveItems(List.Transform(Text.Split([column],"|"), each Record.FieldOrDefault(Replacements, _, _)),{null,""}),",")

sinatriangle.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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