cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

Consolidating Repeated Values

I have a table like this with an ID number and a value assigned to each. Some ID numbers were tested multiple times and so have multiple values. I've seen codes to remove all rows with duplicate ID numbers, but I'd like a code that deletes all rows with duplicate ID's BUT saves the value from the nth test under a new column (e.g. value 2, value 3, value n)...

 

Any help would be greatly appreciated. Below is an example of before and what I would like after.

S_Boilermaker_0-1718048662396.png

S_Boilermaker_1-1718049072147.png

 

 

1 REPLY 1
txnelson
Super User

Re: Consolidating Repeated Values

Easy task

Create a new column.  I called it Sequence and give it the Formula

Col Cumulative Sum(1, :ID)

It will give a sequence number for each row for each separate ID it finds

txnelson_0-1718052245330.png

Now all that has to be done is to use the Split platform to split the data into new columns

     Tables=>Split

txnelson_1-1718052357331.png

Click on OK and it will create a new data table

txnelson_2-1718052406912.png

 

 

Jim

Recommended Articles