cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Mcc99
Level I

Deleting rows with duplicate values in two columns?

Hello, 

I need to delete multiple rows from my data table that have duplicate values in two columns I specify while preserving the first instance of the row. In the example below, only the third row would be deleted, as both columns are duplicates of row 1. Since the C rows have different results they would not be deleted, even though the entry is duplicated within the column. 

IDResult
AX
BY
AX
CZ
DZ
CX

Conversely, it would work to copy all rows that have a unique combination in those two rows into a different location. 

The most efficient solution, such as a JMP script, would be preferred as my data table is a couple of thousand rows tall, and I would really prefer not to do this by hand. Let me know if I need to clarify anything. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Deleting rows with duplicate values in two columns?

Select your columns, Select Duplicate Rows, Delete Rows

jthi_0-1724090499781.png

JMP is able to write a script for that action to enhanced log / workflow

dt << Select Duplicate Rows(Match(:ID, :Result)) << Delete Rows;
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Deleting rows with duplicate values in two columns?

Select your columns, Select Duplicate Rows, Delete Rows

jthi_0-1724090499781.png

JMP is able to write a script for that action to enhanced log / workflow

dt << Select Duplicate Rows(Match(:ID, :Result)) << Delete Rows;
-Jarmo
Mcc99
Level I

Re: Deleting rows with duplicate values in two columns?

Oh, that's super easy thanks!