cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Dennisbur
Level IV

how to merge columns in jmp

Hello
I would like to merge column A and column B into one column.

Dennisbur_0-1671309176887.png

Actually, I have found a solution to change the numeric type of column A and column B to character type

and after this, use "New Formula Column" >> "Concatenate."

My question is, without changing the numeric type, how can I merge column A and column B into column A&B?

Thank you

Dennis

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: how to merge columns in jmp

 You could use a formula which will handle the conversion from numbers to characters and then concatenate those

Char(:A) || Char(:B)

 

Edit:

Also remember to give kudos in wish list make NewFormulaColumn/Character more flexible 

-Jarmo

View solution in original post

5 REPLIES 5
jthi
Super User

Re: how to merge columns in jmp

 You could use a formula which will handle the conversion from numbers to characters and then concatenate those

Char(:A) || Char(:B)

 

Edit:

Also remember to give kudos in wish list make NewFormulaColumn/Character more flexible 

-Jarmo
Thierry_S
Super User

Re: how to merge columns in jmp

Hi,

If you want to keep all the columns as numeric, and the pattern of merging is the same, you could use the straightforward formula below:

1000 * :Column A + :Column B

Best,

TS

Thierry R. Sornasse
Dennisbur
Level IV

Re: how to merge columns in jmp

Hello,

Did you mean this is the formula?

Dennisbur_0-1671349203971.png

Because if I used this formula, I received mathematical calculations and not merge columns 

Dennisbur_1-1671349345171.png

 

hogi
Level XII

Re: how to merge columns in jmp

Too many brackets

txnelson
Super User

Re: how to merge columns in jmp

What @Thierry_S is showing, is that if you want to keep with numeric values, and have them ending up looking like the results from a concatenation with characters, you need to multiply the first number by 100 or 1000 whatever the number of digits (2 or 3) it needs to be displaced by to mimic the concatenation.  Therefore, for your data table the formula would be

:Column 1 * 100 + :Column 2

 

txnelson_0-1671351929161.png

 

Jim