cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

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

How do I select all rows below a specific value?

Hello,

 

Is there a way in JSL to select all rows below a specific value in a column? The tricky part is that I know what the specific value is but I won't know which row it is on or what values may fall below it in the data table.

 

In my Example Data Table, I would like to select where Column 3 == "B" and all subsequent rows. After running the script, rows 4 through 15 should be selected. Keep in mind that the data table will change and I won't know which row "B" will start on or what "A", "X", "Y" and "Z" are or how many rows are in the data table.

 

Ex.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How do I select all rows below a specific value?

I think this script will get you what you want

names default to here(1);
dt=current data table();

dt << select where(
	row()>=min(dt<<get rows where(:Column 3=="B"))
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How do I select all rows below a specific value?

I think this script will get you what you want

names default to here(1);
dt=current data table();

dt << select where(
	row()>=min(dt<<get rows where(:Column 3=="B"))
);
Jim
Raquel
Level III

Re: How do I select all rows below a specific value?

Your script worked perfectly! Thank you so much!

Recommended Articles