<?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 Select Where Duration Is Greater Than in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/242961#M47948</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to select rows where duration is greater than 1 sec. When I try to do this rows that show a duration of 1 sec are getting selected as well. What am I missing? Sample data table attached if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Herrera5238_0-1580065820006.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21350iC1BEB63A6FD1B8E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Herrera5238_0-1580065820006.png" alt="Herrera5238_0-1580065820006.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;&lt;U&gt;Details of what I'm trying to accomplish&lt;/U&gt;&lt;/P&gt;&lt;P&gt;We have data that is recorded every second. I was trying to check if there were any gaps or periods that were not recorded.&lt;/P&gt;&lt;P&gt;Currently trying to complete this check for an entire year, over 25 million rows. Final table would have a start date/time, end date/time column and a column that says the duration of time that there was no data for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps taken&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Started with my column of Date&amp;amp;Time.&lt;/LI&gt;&lt;LI&gt;Created a second column with formula Lag(:Date&amp;amp;Time, -1) and called it EndDate&amp;amp;Time&lt;/LI&gt;&lt;LI&gt;Created a third column that took difference from EndDate&amp;amp;Time and Date&amp;amp;Time column and named it TimeDiff&lt;/LI&gt;&lt;LI&gt;Attempted to select where TimeDiff is greater than 0:00:01&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;-Row that have a value displayed of 0:00:01 are also being selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Jan 2020 19:10:45 GMT</pubDate>
    <dc:creator>Herrera5238</dc:creator>
    <dc:date>2020-01-26T19:10:45Z</dc:date>
    <item>
      <title>Select Where Duration Is Greater Than</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/242961#M47948</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to select rows where duration is greater than 1 sec. When I try to do this rows that show a duration of 1 sec are getting selected as well. What am I missing? Sample data table attached if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Herrera5238_0-1580065820006.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21350iC1BEB63A6FD1B8E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Herrera5238_0-1580065820006.png" alt="Herrera5238_0-1580065820006.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;&lt;U&gt;Details of what I'm trying to accomplish&lt;/U&gt;&lt;/P&gt;&lt;P&gt;We have data that is recorded every second. I was trying to check if there were any gaps or periods that were not recorded.&lt;/P&gt;&lt;P&gt;Currently trying to complete this check for an entire year, over 25 million rows. Final table would have a start date/time, end date/time column and a column that says the duration of time that there was no data for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps taken&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Started with my column of Date&amp;amp;Time.&lt;/LI&gt;&lt;LI&gt;Created a second column with formula Lag(:Date&amp;amp;Time, -1) and called it EndDate&amp;amp;Time&lt;/LI&gt;&lt;LI&gt;Created a third column that took difference from EndDate&amp;amp;Time and Date&amp;amp;Time column and named it TimeDiff&lt;/LI&gt;&lt;LI&gt;Attempted to select where TimeDiff is greater than 0:00:01&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;-Row that have a value displayed of 0:00:01 are also being selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jan 2020 19:10:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/242961#M47948</guid>
      <dc:creator>Herrera5238</dc:creator>
      <dc:date>2020-01-26T19:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where Duration Is Greater Than</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/242971#M47949</link>
      <description>&lt;P&gt;The issue is that your display format is not displaying any decimal values for the duration.&amp;nbsp; Therefore, your value for TimeDiff for Row 1 is displayed as&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; 0:00:01&lt;/P&gt;
&lt;P&gt;But if you specify in the format definition for the column to display 2 decimal points, you would see that Row 1's value is actually&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; 0:00:01.07&lt;/P&gt;
&lt;P&gt;Which when you specify that you want to select all values greater than 1 second, 1.07 seconds is greater than 1 second, so it is selected.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jan 2020 21:04:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/242971#M47949</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-01-26T21:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where Duration Is Greater Than</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/242972#M47950</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/7934"&gt;@Herrera5238&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there are some issues with your formula. better to use the designated Duration formula which allows defining the units explicitly.&lt;/P&gt;
&lt;P&gt;please see the attached file and open the column formulas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jan 2020 21:12:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/242972#M47950</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2020-01-26T21:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where Duration Is Greater Than</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/243272#M48012</link>
      <description>&lt;P&gt;txnelson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This helped me realize why the other rows were getting selected w&lt;SPAN style="font-family: inherit;"&gt;ith my statement of select where TimeDiff &amp;gt;= 0:00:01.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;What I was really after was selecting TimeDiff &amp;gt;= 0:00:01.5. Had I had my display out to two decimal places I would have probably realized this sooner.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 14:15:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/243272#M48012</guid>
      <dc:creator>Herrera5238</dc:creator>
      <dc:date>2020-01-28T14:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where Duration Is Greater Than</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/243274#M48013</link>
      <description>&lt;P&gt;Ron,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did come across this formula before posting but I was still running into issues when using select where.&lt;/P&gt;&lt;P&gt;However I tried it today with a blank slate and it worked! I must have clearly done something wrong when I first tried Date Difference().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm selecting this as solution because you've included the other columns that I was looking to get on my end result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate you, txNelson and the JMP community you guys are awesome!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 14:24:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Duration-Is-Greater-Than/m-p/243274#M48013</guid>
      <dc:creator>Herrera5238</dc:creator>
      <dc:date>2020-01-28T14:24:11Z</dc:date>
    </item>
  </channel>
</rss>

