View Single Post
 
Old 02-16-2021, 09:02 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 871
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

try:
Code:
Result = Table.RemoveColumns(Table.AddColumn(Table.CombineColumnsToRecord(PreviousStep,"merged",{"Hdr1","Hdr2","Hdr3","Hdr4","Hdr5","Hdr6"}), "Custom", each Text.Combine(List.RemoveNulls(Record.ToList([merged])),";")),{"merged"})
where {"Hdr1","Hdr2","Hdr3","Hdr4","Hdr5","Hdr6"} is the list of column headers you want to merge and Custom is the name of the resultant column. The header merged can be anything as long as it is the same throughout; it really doesn't matter what it's called since it's created then deleted in the same line (of course it mustn't be the same as another pre-existing column name).


There are probably better/more elegant ways!
Reply With Quote