cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

Checking if value of a row is consecutive

Hi JMP Community,

 

I want to check if the values of a row are consecutive and if it not then get the value of the first row which doesn't satisfy the condition.

 

For example : In this table, Column 1 has rows 1 to 15 that have consecutive values 1,2,3 and then row 16 has value of 12. So I would like to get the value of that first row that doesn't satisfy the consecutive condition.

 

Is there a more jsl way than using an iterator? 

Jackie__1-1686755738953.png

 

 

Thanks, 
Jackie

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Checking if value of a row is consecutive

One option would be to use Lag() or Dif() with Get Rows Where()

first_nok = Min(dt << Get Rows Where(Dif(:Column 1) > 1));
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Checking if value of a row is consecutive

One option would be to use Lag() or Dif() with Get Rows Where()

first_nok = Min(dt << Get Rows Where(Dif(:Column 1) > 1));
-Jarmo
Jackie_
Level VI

Re: Checking if value of a row is consecutive

Awesome! Thanks Jarmo!

Recommended Articles