cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
AlexR846
Level III

How to convert Column Data type from Character into Numeric wihtout losing Numeric values in the column

Dears,

Started with JMP few weeks ago !! It's a naive question.

I am trying to convert a column Data type from Character to Numeric, however i am losing the all the Numeric values from the column while converting the data type to Numeric.

Please find the attached screenshots for the same.

 

How to retain the numeric values from a column when i change it's data type from Character into Numeric??

Tried by replacing the characters using following commands,

 

values1 = dt:RequiredColumn<<Get Values;

Regex( :RequiredColumn, "[^0-9]", "", GLOBALREPLACE );

 

with this all the numeric values are also getting replaced.

 

Simply i would like to retain the Numeric values from the column (originally in Character data type). Tried to search for this problem in our community couldn't achieve any relevant information about it.

 

Picture01 - OriginalColumnFormat  - Screenshot of Column's original data type

Picture02 - ColumnafterChangingDatatype- Screenshot of Column's after changing the data type to Numeric.

 

Thanks in Advance...

 

ColumnafterChangingDatatype.JPG OriginalColumnFormat.JPG

10 REPLIES 10

Re: How to convert Column Data type from Character into Numeric wihtout losing Numeric values in the column

Greetings all. An update for you - it looks like some work has been done for this issue in the JMP 17 timeframe. Specifically, an additional argument has been added to Num() and Informat() to help you control what is considered a valid number. Any JMP 17 EA7 (or later) users can try this out now; others will need to wait until JMP 17 is available in Fall of 2022. Thanks for reporting this! We do monitor these forums and look to fix things like this when possible.