Forum Discussion

MasterSonic's avatar
MasterSonic
Icon for Helper IV rankHelper IV
3 years ago
Solved

Struggling to remove ~DE and ~

Hi guys,

I need some fresh idea, how to remove ~DE and ~ from the end the string please?
Majority of column has ~DE, which is easy to do remove (text after delimiter)
But after removing it I have few rows like 3 (example below), that are blank after that process.

Can I ask you for some idea how to process that please?

IDColumn
1triglyceride glue~DE
2lututudu glue~DE
3product 1~
4produict 1~4

 

 

  • AlienSx's avatar
    AlienSx
    3 years ago
    Text.TrimEnd( Text.Replace( your_string, "~DE", "" ), "~" )

5 Replies

  • MasterSonic  you want remove or split if you split it will be blank but if you no need split column so you can delete.

     

  • >Add Custom Column :
      > Text.Select([Column],{"A".."z","0".."9"})

  • this? 

    Text.Replace( Text.Replace( your_string, "~DE", "" ), "~", "" )
  • Hi guys,

    resutls I am looking is this :
    removing ~DE and ~(if last character only)

    IDColumn
    1triglyceride glue
    2lututudu glue
    3product 1
    4produict 1~4



    I will try with spliting perhaps

     

    • AlienSx's avatar
      AlienSx
      Icon for Super User rankSuper User
      Text.TrimEnd( Text.Replace( your_string, "~DE", "" ), "~" )