<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Checking if value of a row is consecutive in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Checking-if-value-of-a-row-is-consecutive/m-p/642296#M83923</link>
    <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a more jsl way than using an iterator?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jackie__1-1686755738953.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/53809i1AC9BDB67724C9B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jackie__1-1686755738953.png" alt="Jackie__1-1686755738953.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;BR /&gt;Jackie&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 15:27:19 GMT</pubDate>
    <dc:creator>Jackie_</dc:creator>
    <dc:date>2023-06-14T15:27:19Z</dc:date>
    <item>
      <title>Checking if value of a row is consecutive</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-value-of-a-row-is-consecutive/m-p/642296#M83923</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a more jsl way than using an iterator?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jackie__1-1686755738953.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/53809i1AC9BDB67724C9B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jackie__1-1686755738953.png" alt="Jackie__1-1686755738953.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;BR /&gt;Jackie&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 15:27:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-value-of-a-row-is-consecutive/m-p/642296#M83923</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-14T15:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Checking if value of a row is consecutive</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-value-of-a-row-is-consecutive/m-p/642318#M83925</link>
      <description>&lt;P&gt;One option would be to use Lag() or Dif() with Get Rows Where()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;first_nok = Min(dt &amp;lt;&amp;lt; Get Rows Where(Dif(:Column 1) &amp;gt; 1));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Jun 2023 15:40:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-value-of-a-row-is-consecutive/m-p/642318#M83925</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-06-14T15:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Checking if value of a row is consecutive</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-value-of-a-row-is-consecutive/m-p/642334#M83926</link>
      <description>&lt;P&gt;Awesome! Thanks Jarmo!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 15:46:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-value-of-a-row-is-consecutive/m-p/642334#M83926</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-14T15:46:26Z</dc:date>
    </item>
  </channel>
</rss>

