cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
tdiehl
Level II

Concatenate values in a column

Seems like this should be simple, but I cannot find a clear example.  I would like to concatinate the values in columns of a specific name("ROW" and "COL") and create a new column with the result in it.  Example below. 

 

ROW    COL     CELL

   5          1         5_1

   3          2         3_2

  12         -1       12_-1

 

best shot at code so far:

 

column("ROW") << Data type(Character);
column("COL") << Data type(Character);

//a = {column("ROW"), column("COL")};  
ConExpr = concat items({column("ROW"), column("COL")} , "_"); 

//Add "CELL" column = concat col(ROW) "_" col(COL)
dt << new column("CELL",Character, "Nominal", Format("Best", 12), formula(eval(Expr(ConExpr))));

 

my results:

CELL

   _

   _

 

Any help in understanding why my code evaluates to that and the correct implementation would be greatly appreciated. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Concatenate values in a column

Here is all you need to do:

dt << new column("CELL", character,
     formula(:ROW || "_" || :COL));
Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Concatenate values in a column

Here is all you need to do:

dt << new column("CELL", character,
     formula(:ROW || "_" || :COL));
Jim

Recommended Articles