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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Remove Text from Specific Column

Hi , I am new to Power BI.

Could any one please guide how to remove "Text " from Alpha numeric coulmns. I want to create another column only with numbers to get average of it.


waiting time.PNG

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

Hi @Anonymous ,

 

To create a custom column as below.

 

Text.Select([Minutes], {"0".."9"})

2.PNG

 

M code for your reference:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlLwzcwrLUktVoqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Minutes = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Minutes", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Select([Minutes], {"0".."9"})),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type number}})
in
    #"Changed Type1"
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create a custom column as below.

 

Text.Select([Minutes], {"0".."9"})

2.PNG

 

M code for your reference:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlLwzcwrLUktVoqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Minutes = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Minutes", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Select([Minutes], {"0".."9"})),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type number}})
in
    #"Changed Type1"
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi, 


Thanks for your responses. It can also be done using Delimiter ( Transform > Extract >)

amitchandak
Super User
Super User

This is M language will work in Edit query mode.

 

In DAX use left, right, mid and search functions.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Well this is ia power query forum. Don't know why we would put Dax in here.

Anonymous
Not applicable

I am presuming that you might have decimals or commas in your number. You can adjust  the boldface text below accordingly.

Text.Combine(List.Select( Text.ToList([Minutes]), each List.Contains({"0".."9",".",","}, [Minutes])))

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors