cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jorismo
Helper II
Helper II

Convert alphanumeric to numeric

Hi all,

 

I've found this solution but it didn't work for my case:

try Number.FromText([Text]) otherwise null

I've got a column that is build on alphanumeric characters. (SVF-11254, svf685, SVF742, ....) now I only need the number and nothing else to get the connection with another table right.

 

I can't use (I think) the delimiter because there are some numbers with 3, 4 or 5 numbers. 

 

With the solution of the 'try number.....' I also get null values for SVF9294 which need to be 9294

 

Thanks for the help!

1 ACCEPTED SOLUTION
HashamNiaz
Super User
Super User

Hi @jorismo !

Please try creating a new Column from example in Power Query Editor;

 

In the new column example type only Integer values for the column, you need to provide 3/4 example value and it will generate M Code to create the new column containing only integer values.

 

Column from Examples 

 

Regards,

Hasham

View solution in original post

2 REPLIES 2
HashamNiaz
Super User
Super User

Hi @jorismo !

Please try creating a new Column from example in Power Query Editor;

 

In the new column example type only Integer values for the column, you need to provide 3/4 example value and it will generate M Code to create the new column containing only integer values.

 

Column from Examples 

 

Regards,

Hasham

That works, thanks!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors