<?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 Re: Filtering out data from the last recorded day to the week prior. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Filtering-out-data-from-the-last-recorded-day-to-the-week-prior/m-p/274817#M53306</link>
    <description>&lt;P&gt;Take a look at the col max function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = open("$Sample_Data\Functional Data\Weekly Weather Data.jmp");
dt &amp;lt;&amp;lt; Tabulate(
       Show Control Panel( 0 ),
       Add Table(
              Column Table( Analysis Columns( :LATITUDE ), Statistics( Mean ) ),
              Row Table( Grouping Columns( :NAME ) )
       ),
       Local Data Filter(
              Add Filter(
                     columns( :DATE ),
                     Where( :DATE &amp;gt;= col max(:Date) - in days(7) )
              )
       )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Jun 2020 20:02:58 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2020-06-22T20:02:58Z</dc:date>
    <item>
      <title>Filtering out data from the last recorded day to the week prior.</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-out-data-from-the-last-recorded-day-to-the-week-prior/m-p/274802#M53304</link>
      <description>&lt;P&gt;Hello, first project here and first post. I'm very new to JMP and JSL for that matter and have learned a lot with the few days I've had with it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I need grab data from a huge table that would include the most recently recorded date and backwards a week (as the title says).&amp;nbsp; I am using a local data filter and used the Today() function and subtracted In Days(7), which would have worked... only if data were to be updated daily which it is not.&amp;nbsp; So my question would be is if there is a way to be able to use the Local Data Filter to find the most recent date in a column and from that day, go back a week prior without hard coding it (needs to update daily if there is data) like it is done below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the Weekly Weather Data for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Tabulate(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show Control Panel(&amp;nbsp;0&amp;nbsp;),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Table(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Column Table( Analysis Columns( :LATITUDE ), Statistics( Mean ) ),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Row Table( Grouping Columns( :NAME ) )
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Local Data Filter(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Filter(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns( :DATE ),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where( :DATE &amp;gt;=&amp;nbsp;19Dec2016&amp;nbsp;&amp;amp; :DATE &amp;lt;=&amp;nbsp;26Dec2016&amp;nbsp;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )
);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Because today is June 22, 2020 and the last recorded date was Dec 26, 2016, how would I be able to automatically keep checking everyday forward for new data but if nothing is added be able to go to the most recent data and traverse back a week?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully what I said makes sense. Thank you for any advice everyone.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:15:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-out-data-from-the-last-recorded-day-to-the-week-prior/m-p/274802#M53304</guid>
      <dc:creator>TheJVilla</dc:creator>
      <dc:date>2023-06-10T23:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering out data from the last recorded day to the week prior.</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-out-data-from-the-last-recorded-day-to-the-week-prior/m-p/274817#M53306</link>
      <description>&lt;P&gt;Take a look at the col max function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = open("$Sample_Data\Functional Data\Weekly Weather Data.jmp");
dt &amp;lt;&amp;lt; Tabulate(
       Show Control Panel( 0 ),
       Add Table(
              Column Table( Analysis Columns( :LATITUDE ), Statistics( Mean ) ),
              Row Table( Grouping Columns( :NAME ) )
       ),
       Local Data Filter(
              Add Filter(
                     columns( :DATE ),
                     Where( :DATE &amp;gt;= col max(:Date) - in days(7) )
              )
       )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jun 2020 20:02:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-out-data-from-the-last-recorded-day-to-the-week-prior/m-p/274817#M53306</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2020-06-22T20:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering out data from the last recorded day to the week prior.</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-out-data-from-the-last-recorded-day-to-the-week-prior/m-p/274823#M53308</link>
      <description>&lt;P&gt;I knew it had to be something simple. I made it so much harder than it needed to be. It's working great so far (on a much, much bigger table) so thank you very much!&amp;nbsp; If something comes up I'll say something, but thanks a bunch!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 20:51:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-out-data-from-the-last-recorded-day-to-the-week-prior/m-p/274823#M53308</guid>
      <dc:creator>TheJVilla</dc:creator>
      <dc:date>2020-06-22T20:51:11Z</dc:date>
    </item>
  </channel>
</rss>

