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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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)- 

Remove Text from Number.JPG

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

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"})

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

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. 

Replace_1.pngReplace_2.png

 

View solution in original post

3 REPLIES 3
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. 

Replace_1.pngReplace_2.png

 

Greg_Deckler
Super User
Super User

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"})

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks @Greg_Deckler @Anonymous 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.