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
letitiaB
New Member

Removing the last character from text data?

I'm trying to convert 6-digit postal codes into 5-digits in edit queries. I'm having a couple of issues but the main one is how to remove the last character in a string of text data. Additionally, I'd like to remove spaces and convert all letters to upper case. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

All these are available on the Transform tab in Edit Queries.  

 

To keep only the first five characters of a text field:

  1. Highlight the field
  2. On the Transform menu, click Extract (in Text Column section) -> First Characters, then enter 5 in the dialogue box

 

To remove spaces:

  1. Highlight the field
  2. On the Transform menu, click Replace Values (in Any Column section) -> Replace Values, then enter a space in the Value To Find box and nothing in the Replace With dialogue box

 

To convert all letters to upper case:

  1. Highlight the field
  2. On the Transform menu, click Format (in Text Column section) -> then click UPPERCASE

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

All these are available on the Transform tab in Edit Queries.  

 

To keep only the first five characters of a text field:

  1. Highlight the field
  2. On the Transform menu, click Extract (in Text Column section) -> First Characters, then enter 5 in the dialogue box

 

To remove spaces:

  1. Highlight the field
  2. On the Transform menu, click Replace Values (in Any Column section) -> Replace Values, then enter a space in the Value To Find box and nothing in the Replace With dialogue box

 

To convert all letters to upper case:

  1. Highlight the field
  2. On the Transform menu, click Format (in Text Column section) -> then click UPPERCASE

 

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.

Top Solution Authors
Top Kudoed Authors