Forum Discussion
k1s1
Helper I
5 years agoMore efficient way to keep only numbers in multiple columns
Hello I'm using this to strip out everything except numerals from ~150 columns: #"Convert response to numbers"=Table.TransformColumns( #"Removed Columns1" , {{"Column1 Name", each Text.Sele...
- Anonymous5 years ago
the first thing that comes to mind is to merge all the columns through a character not present in the texts (#, for example) apply your rules to the union columns and then redo the division of the colonan through the added separator (# , in the example)
k1s1
Helper I
5 years agoMany thanks, that's a good idea which will certainly save typing
- Anonymous5 years agoNot applicable
depending on the complexity of your data, a solution that creates a dynamic list as the second argument of the Table.TransformColumns function might be more suitable.
I just give an idea of how to do it. The implementation is not very simple. But if you are interested and provide a sample table that I can copy, I can try to develop the idea.
names=tableColumnnames(youtable), secondParameter=List.Transform(names, each {_, functionLikeTextSelkect}) //{{"Column1 Name", each Text.Select( _ , {"0".."9","-","."} ) }, {"Column2 Name", each Text.Select( _ , {"0".."9","-","."} ) }}