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
lastnn30
Post Patron
Post Patron

spliting numbers

Hi

I got list of tallest building from the link below. One table has Height column and the numbers are like this

 

100.3 m

200m

300 m

400.1m

 

How to get rid of m? I used Power Query-->Split-->Delimiter , first using Space and I got rid of some m but for numbers like this

 

200m

 

I can use Split--> From Digit to Non Digit, but for number like this

 

400.1m

 

If I used Split-->Digit to non Digit, I will get this

 

400      .1     m

 

But I want to split like this   400.1   m

 

What you would do? Thank you so much.

 

https://en.wikipedia.org/wiki/List_of_tallest_buildings

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@lastnn30 In Power Query use a Replace to replace "m" with "" (nothing) and then do Trim and Clean operations.


@ 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

tackytechtom
Super User
Super User

Hi @lastnn30 ,

 

How about this:

 

Before:

tackytechtom_0-1671988910441.png

 

 

After:

tackytechtom_1-1671988934950.png

 

 

Just right click onto the column and press Replace Values...:

tackytechtom_2-1671988982487.png

 

Chose "m" for Value to Find and leave Replace With empty:

tackytechtom_3-1671989027962.png

 

 

Finally, change Data Type to Decimal Number:

tackytechtom_4-1671989062910.png

 

Was this what you were after? Let me know 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
tackytechtom
Super User
Super User

Hi @lastnn30 ,

 

How about this:

 

Before:

tackytechtom_0-1671988910441.png

 

 

After:

tackytechtom_1-1671988934950.png

 

 

Just right click onto the column and press Replace Values...:

tackytechtom_2-1671988982487.png

 

Chose "m" for Value to Find and leave Replace With empty:

tackytechtom_3-1671989027962.png

 

 

Finally, change Data Type to Decimal Number:

tackytechtom_4-1671989062910.png

 

Was this what you were after? Let me know 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Greg_Deckler
Super User
Super User

@lastnn30 In Power Query use a Replace to replace "m" with "" (nothing) and then do Trim and Clean operations.


@ 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...

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.