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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
water-guy-5
Helper III
Helper III

Removing a character from a column using M

Here I have rainfall data. Sometimes the precipitation will have an "s" at the end of the value which is preventing me from converting the column to value type. Is there any function I can use to remove these. 

waterguy5_0-1651257308813.png

 



Info that might help:
- the max number of characters in the column is 4 (well besides the ones with 's'). So it's NUMBER, DECIMAL, NUMBER, NUMBER and sometimes "s". Is there some sort of way to just say shorten the column from left to right and make it 4 characters? Can I split it by a delimiter? 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @water-guy-5 

Instead of splitting it by number of Characters, you can also try replacing all 's' characters with '' characters in the column to removing the character 's'.

1.png

1.png

 

Best Regards,
Community Support Team _ Eason

View solution in original post

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi, @water-guy-5 

Instead of splitting it by number of Characters, you can also try replacing all 's' characters with '' characters in the column to removing the character 's'.

1.png

1.png

 

Best Regards,
Community Support Team _ Eason

HotChilli
Super User
Super User

Apologies : by Number of Characters.

Though, confusingly, it adds a step called Split Column By Position

Duh!!!! Thank you. It's a Friday and my brain is giving out on me...I appreciate the help.

HotChilli
Super User
Super User

You can split by delimiter (by position) - right-click the column and look for Split Column

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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