Forum Discussion

webportal's avatar
webportal
Impactful Individual
6 years ago
Solved

Removing punctuation from a column in Power Query

Can anyone help me in removing punctuation from a column in Power Query?

 

This is what I'm trying:

 

 

= Table.TransformColumns(#"Texto em Maiúsculas",{{"descritivo", Text.Select(#"Texto em Maiúsculas"[descritivo], List.Combine({{"A".."Z"},{"a".."z"},{" "}})), type text}})

 

 

The column is "descritivo" and the previous step in Power Query is  "Texto em Maiúsculas".

 

Thanks!

  • Hi webportal ,

     

    I add a step "Added Custom1" in your formula.

    = Table.TransformColumnTypes(Table.AddColumn(#"Uppercased Text", "Custom.1", each Text.Select([Column1],List.Combine({{"A".."Z"},{"a".."z"},{" "}}))),{{"Custom.1", type text}})

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WiogKU0grStRTcAx2iyk1MDAyV4rViVZydHMJdnHXU0gJdNFPB4skFqelF6cWpRvoaoD56YlpKcWKDspKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
        #"Uppercased Text" = Table.TransformColumns(#"Changed Type",{{"Column1", Text.Upper, type text}}),
        #"Added Custom1" = Table.TransformColumnTypes(Table.AddColumn(#"Uppercased Text", "Custom.1", each Text.Select([Column1],List.Combine({{"A".."Z"},{"a".."z"},{" "}}))),{{"Custom.1", type text}})
    in
        #"Added Custom1"

     

     

3 Replies