My power query table has an unknown number of columns upon refresh, all columns with type decimal except for a single column name "Custom" which is type Number. I want to be able to merge all columns except for the "Custom" column. I cannot select the columns and do it because in the next refresh the column names might be different
= List.Select(Table.ColumnNames(ConveretedtoDecimal), each _ <> "Custom")
This works and generates the correct list of column names
=Table.TransformColumns(ConvertedtoDecimal, {{"Custom", each Text.Combine(List.Transform(columnsToMerge, each Text.From(_)), ""), type text}})
If I understand correctly, and you want to combine these numeric columns as text strings with no separator, then you could use this snippet:
#"Cols to Merge" = List.RemoveItems(Table.ColumnNames(#"Previous Step"),{"Custom"}),
//Change merge columns to text, then combine them with no delimiter
#"Type Merge as Text" = Table.TransformColumnTypes(#"Previous Step",
List.Transform(#"Cols to Merge", each {_, type text})),
#"Merged Columns" = Table.CombineColumns(#"Type Merge as Text",
#"Cols to Merge",
Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Merged")
""
as the delimiter