Forum Discussion
Anonymous
6 years agoNot applicable
bulk find and replace
Hi Everyone I want to bulk remove the delimiters for all the columns containing a certain name. In this case: Price. There are 200 columns containing this -> sales price, purchasing price... etc....
artemus
6 years agoMicrosoft Employee
Something like
Table.TransformColumns(PreviousStep, List.Transform(List.Select(Table.ColumnNames(PreviousStep), each Text.Contains(_, "price")), each {_, each Text.BetweenDelimiters(_, "(", ")")}))
If you also want them all converted to a number:
Table.TransformColumns(PreviousStep, List.Transform(List.Select(Table.ColumnNames(PreviousStep), each Text.Contains(_, "price")), each {_, each Number.From(Text.BetweenDelimiters(_, "(", ")")), type number}))