Merging columns
Merge Columns joins several columns into one text column. Text can only be joined to text, so when any of the columns hold numbers, Power Query converts them to text first and then combines the columns. The step it writes looks like this:
#"Merged Columns" = Table.CombineColumns( Table.TransformColumnTypes( Source, { {"Column 2", type text}, {"Column 3", type text}}, "en-GB" ), {"Column 1", "Column 2", "Column 3"}, Combiner.CombineTextByDelimiter("", QuoteStyle.None), "Merged" )The inner Table.TransformColumnTypes converts the numeric columns, Column 2 and Column 3, to text, and the outer Table.CombineColumns then merges Column 1, Column 2 and Column 3 into a column called Merged.
Every column is named in the step, so if any of them is renamed in the source, the next refresh fails.
Merging without naming the columns
Section titled “Merging without naming the columns”The fix is to take the column names from the table, instead of writing them into the step.
First, add a step called ColumnsToMerge that returns the table’s column names as a list. This assumes that every column is to be merged:
= Table.ColumnNames(Source)The step returns a list of the names:

Then change the merge step so that it uses that list in both places where it named columns:
#"Merged Columns" = Table.CombineColumns( Table.TransformColumnTypes( Source, List.Transform( ColumnsToMerge, each{_, type text} ), "en-GB" ), ColumnsToMerge, Combiner.CombineTextByDelimiter("", QuoteStyle.None), "Merged" )The result is the same, but the step no longer mentions any column by name, so it survives a renamed column.
The change rests on List.Transform, which turns each name in ColumnsToMerge into a pair such as {"Column 1", type text}. That list of pairs is exactly what Table.TransformColumnTypes expects as its second argument. The same pattern, building a function’s arguments from a list rather than typing them out, makes many generated steps more robust.
The technique on this page follows one in Gil Raviv’s Collect, Combine, and Transform Data Using Power Query in Excel and Power BI (Microsoft Press).