Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to remove text from numbers

Hi Everyone,

Hope you can help me with this -

I have columns that has mix values (Some cells have text attached to the numbers) as below screen shot.

My question is how do I remove the Text attached with the numbers and I just want to keep the numbers (Basically just want to remove all the MM as shown in the picture below)- 

  • In Power Query Editor, right-click column header. Replace Values. Value to find = MM. Replace with (leave this blank) and then OK, should insert a line like this:

     

        #"Replaced Value" = Table.ReplaceValue(#"Changed Type","MM","",Replacer.ReplaceText,{"Column1"})
  • Anonymous's avatar
    Anonymous
    7 years ago

    If you want to make changes to the same column:

     

    Go to edit Queries -> Replace values -> Replace MM with 0 (zero). then you can change the type of the column to "123" or keep it as text as you wish. 

     

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    In Power Query Editor, right-click column header. Replace Values. Value to find = MM. Replace with (leave this blank) and then OK, should insert a line like this:

     

        #"Replaced Value" = Table.ReplaceValue(#"Changed Type","MM","",Replacer.ReplaceText,{"Column1"})
  • Anonymous's avatar
    Anonymous
    Not applicable

    If you want to make changes to the same column:

     

    Go to edit Queries -> Replace values -> Replace MM with 0 (zero). then you can change the type of the column to "123" or keep it as text as you wish.