Forum Discussion
Betty888
Helper II
3 years agoHow to create a new column with a different concatenation
Dear all, I'm not sure what I will descrive will be easy to understand, not even whether it is possible or not, but I'll try .... I have a table with 3 columns where information were concatenate...
- 3 years ago
Hello Betty888,
Can you please try this:
Col4 = VAR Products = SUBSTITUTE([col1], ";", "|") VAR Doses = SUBSTITUTE([col2], ";", "|") VAR Labels = SUBSTITUTE([col3], ";", "|") VAR ProductList = GENERATE(SPLIT(Products, "|"), SPLIT(Doses, "|"), SPLIT(Labels, "|")) RETURN CONCATENATEX(ProductList, [Column1] & " " & [Column2] & " " & [Column3], CHAR(10))
Ashish_Mathur
Super User
3 years agoHi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each Text.Combine(List.Combine(List.Zip({Text.Split([col1],";"),Text.Split([col2],";"),Text.Split([col3],";")})),","))
in
#"Added Custom"
I just do not know how to get the Alt+Enter after every third item in the list.