Forum Discussion
Select columns starting with
- 6 years ago
Yes. If you look at the M code, the column names to be combined is a list. You could try putting this M code in place of the existing list (for example for the Assumptions columns)
List.FindText(Table.ColumnNames(#"Removed Other Columns1"), "Assumptions")
That would make a list of all the column names that contain Assumptions. As it grows, so will that list.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Hi Pat,
Thanks for responding. I see what the intent of this is, can you just clarify for me where I use this? Do I add as a step before every merger or do I include it in the merge action when selecting the columns?
Thanks,
OF
Put that code to replace part of the M code of the #merged columns step. Replace the curly bracket list of assumptions column names. The new code will dynamically generate same.
Regards
Pat