Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
How could I remove all:
thank you very much
Solved! Go to Solution.
For a column:
= Table.TransformColumns(TableOrPriorStepName, {{"ColumnName", each Text.Remove(_, {"-", "/", ".", "(", ")"})}})
I didn't add all of your characters, but you get it.
--Nate
Nasically, you are just providing a list of quoted characters to remove, like
{"-", "(", ")", " ", "/", ",", ".", "#"}
I'd need to see the leading zeros and trailing zeros, but if you want to get rid of zeros, just add "0" to the list.
You could also use
each Text.Select([ColumnName], {{"A".."Z"}, {"a".."z"}, {"1".."9"}}). This will keep only letters and text numbers except zero.
--Nate
Text.Trim will clean up leading and trailing spaces but you can also use it to trim other characters. So you could write this
each Text.Trim(Text.Trim(Text.Remove(_, {"-", "/", "\", ".", "(", ")", "#", ","})), "0")
to remove the listed characters, then remove leading and trailing spaces, then remove leading and trailing "0".
Nasically, you are just providing a list of quoted characters to remove, like
{"-", "(", ")", " ", "/", ",", ".", "#"}
I'd need to see the leading zeros and trailing zeros, but if you want to get rid of zeros, just add "0" to the list.
You could also use
each Text.Select([ColumnName], {{"A".."Z"}, {"a".."z"}, {"1".."9"}}). This will keep only letters and text numbers except zero.
--Nate
thank you very much!
For a column:
= Table.TransformColumns(TableOrPriorStepName, {{"ColumnName", each Text.Remove(_, {"-", "/", ".", "(", ")"})}})
I didn't add all of your characters, but you get it.
--Nate
Hi Nate, I thought I could figure that out but I am sorry. I cant. Could you kindly add the other ones? I am a little confused on the leading and trailing 0's, spaces too (at the end and beginning).
grateful for the help.
Text.Trim will clean up leading and trailing spaces but you can also use it to trim other characters. So you could write this
each Text.Trim(Text.Trim(Text.Remove(_, {"-", "/", "\", ".", "(", ")", "#", ","})), "0")
to remove the listed characters, then remove leading and trailing spaces, then remove leading and trailing "0".
Nice! I resorted to doing it individually but this will certainly clean it up.