Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Raquel
Level II

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
Highlighted
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
Highlighted
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

Highlighted
Raquel
Level II

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

Your script worked perfectly! Thank you so much!

Article Labels

    There are no labels assigned to this post.