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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
kressb
Helper V
Helper V

Remove Characters from Text Column in PowerQuery

Hello, 

I have a column like this:

Person11.00 - Blue; 0.50 - Red
Person21.00 - Blue; 0.10 - Green
Person31.00 - Green; 0.25 - Red
Person40.50 - Red; 0.30 - Green

 

I want to do a transformation in PowerQuery that removes the Decimal Number and the Dash:

Person1Blue; Red
Person2Blue; Green
Person3Green; Red
Person4Red; Green

 

I tried this in Advanced Editor:

GetRidOfNumber =
   Table.TransformColumns(
            #"Changed Type1",
                     {
                     {
                          "Column2",
                             (text)=> Text.Remove(text,{"0".."9"})
                     }
                     }
                                           )
in
GetRidOfNumber

 

That gave me:

Person1. - Blue; . - Red
Person2. - Blue; . - Green
Person3. - Green; . - Red
Person4. - Red; . - Green

How do I get rid of the decimal point and hyphen?

TYIA

1 ACCEPTED SOLUTION
Jakinta
Solution Sage
Solution Sage

You can just expand list for 2nd argument, like this: {"0".."9",".","-"} or go with each Text.Select(_,{"a".."z","A".."Z"," "})...

View solution in original post

1 REPLY 1
Jakinta
Solution Sage
Solution Sage

You can just expand list for 2nd argument, like this: {"0".."9",".","-"} or go with each Text.Select(_,{"a".."z","A".."Z"," "})...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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