Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Galat
Frequent Visitor

How Clean Text Data

Hi, I need to pull all the single words out of the sentence.
I mean I should have just been words without numbers or any other symbol!
I use the following formula:
Table.AddColumn (# "Changed Type", "Custom", each Text.Remove ([name], {"!", "@", "#", "$", "%", "^", "& "," * "," (",") "," - "," _ "," + "," = "," {","} "," [","] "," | ", "\", "/", "~", "` ","? ",": ",". "," <","> "," 0 "," 1 "," 2 "," 3 "," 4 "," 5 "," 6 "," 7 "," 8 "," 9 "}))

 

The problem is I can't quite clear everything and there are many more symbols left between the words. Of course, it is not possible to manually search for any icon and delete it.

11.jpg

Does anyone know a way to deal with this problem?

Raw Data 

 

1 ACCEPTED SOLUTION
mussaenda
Super User
Super User

Hi @Galat,

 

I searched and found this:

Text.Select([name],{"a".."z","A".."Z","0".."9"," "})

 

By the way, I found that on this thread:

https://community.powerbi.com/t5/Desktop/Removing-special-characters-and-symbols-from-a-column/td-p/... 

 

Hope this helps!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

try

TextEncoding.Utf8
TextEncoding.Unicode

=D

Anonymous
Not applicable

For another situation I had built a function that removes "non-standard" characters from a text. I think it could be for you.

 

 

 

 

 

let
  fnCngNotStndCharsToDef = (str_in as text, stndChrs as list, optional defChar as text) => 
    Text.Combine(
        List.Transform(
            Splitter.SplitTextByRepeatedLengths(1)(str_in), 
            each Record.FieldOrDefault(Record.FromList(stndChrs, stndChrs), _, defChar)
          )
      )
in
  fnCngNotStndCharsToDef

 

 

 

 

 

an example of use:

 

image.png

 

PS

Actually the function has a slightly more general extension, being able to replace non-standard characters with a chosen default character.
If this is omitted, the result is to remove unwanted characters.

 

mussaenda
Super User
Super User

Hi @Galat,

 

I searched and found this:

Text.Select([name],{"a".."z","A".."Z","0".."9"," "})

 

By the way, I found that on this thread:

https://community.powerbi.com/t5/Desktop/Removing-special-characters-and-symbols-from-a-column/td-p/... 

 

Hope this helps!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors