取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
选择语言 隐藏翻译栏
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 个已接受解答

已接受的解答
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

在原帖中查看解决方案

5 条回复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 XIII

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

推荐文章