<?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 Flaging the latest date in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/437427#M28241</link>
    <description>&lt;P&gt;Hi i want to use the latest date from the following data using the query builder&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CASE_ID,Activity_Creator,Decisioned_By,comment,Suspect_Reason,Agency_Date&lt;BR /&gt;25412,RAPID INVESTIGATION SERVICES,Agency,CREDIT REFER,06FEB2018:15:35:14.00&lt;BR /&gt;25412,RAPID INVESTIGATION SERVICES,Agency,CREDIT REFER,06FEB2018:15:33:00.00&lt;BR /&gt;14284,SHARP EAGLE INVESTIGATION PVT LTD,Agency,SALARY SLIP VERIFICATION,01NOV2017:15:33:41.00&lt;BR /&gt;14284,SHARP EAGLE INVESTIGATION PVT LTD,Agency,VERIFICATION OF SALARY SLIP,01NOV2017:15:40:11.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want to create new column as flag and flag only the latest date .&lt;/P&gt;&lt;P&gt;so that i use its distinct records only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or can anyone suggest how can we use group by in query builder.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 06:54:47 GMT</pubDate>
    <dc:creator>anirudhs</dc:creator>
    <dc:date>2018-02-15T06:54:47Z</dc:date>
    <item>
      <title>Flaging the latest date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/437427#M28241</link>
      <description>&lt;P&gt;Hi i want to use the latest date from the following data using the query builder&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CASE_ID,Activity_Creator,Decisioned_By,comment,Suspect_Reason,Agency_Date&lt;BR /&gt;25412,RAPID INVESTIGATION SERVICES,Agency,CREDIT REFER,06FEB2018:15:35:14.00&lt;BR /&gt;25412,RAPID INVESTIGATION SERVICES,Agency,CREDIT REFER,06FEB2018:15:33:00.00&lt;BR /&gt;14284,SHARP EAGLE INVESTIGATION PVT LTD,Agency,SALARY SLIP VERIFICATION,01NOV2017:15:33:41.00&lt;BR /&gt;14284,SHARP EAGLE INVESTIGATION PVT LTD,Agency,VERIFICATION OF SALARY SLIP,01NOV2017:15:40:11.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want to create new column as flag and flag only the latest date .&lt;/P&gt;&lt;P&gt;so that i use its distinct records only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or can anyone suggest how can we use group by in query builder.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 06:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/437427#M28241</guid>
      <dc:creator>anirudhs</dc:creator>
      <dc:date>2018-02-15T06:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging the latest date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/437438#M28244</link>
      <description>&lt;P&gt;Clone of &lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/How-to-flag-the-latest-date-or-use-group-by/m-p/437428" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/How-to-flag-the-latest-date-or-use-group-by/m-p/437428&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post the data you want to be flagged as data-step and the expected result dataset, so that we can see what you have and need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SQL you could do something like "... having Agency_Date = max(Agency_Date)" if Agency_Date is a proper sas datetime.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 08:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/437438#M28244</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-02-15T08:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging the latest date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/437465#M28247</link>
      <description>Hi I want the following records in the data set .&lt;BR /&gt;CASE_ID,Activity_Creator,Decisioned_By,comment,Suspect_Reason,Agency_Date&lt;BR /&gt;25412,RAPID INVESTIGATION SERVICES,Agency,CREDIT REFER,06FEB2018:15:35:14.00&lt;BR /&gt;14284,SHARP EAGLE INVESTIGATION PVT LTD,Agency,VERIFICATION OF SALARY SLIP,01NOV2017:15:40:11.00&lt;BR /&gt;&lt;BR /&gt;As these are eg ... but the logic should work on multiple observations.. from which i should get the latest of the grouped dates.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2018 09:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/437465#M28247</guid>
      <dc:creator>anirudhs</dc:creator>
      <dc:date>2018-02-15T09:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging the latest date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/438004#M28270</link>
      <description>In SQL you could probably do a case when agency_date=max(agency_date), not sure if you could pull it off in query builder though. &lt;BR /&gt;(Why) is it important to use the Query Builder specifically?</description>
      <pubDate>Fri, 16 Feb 2018 15:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/438004#M28270</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-02-16T15:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging the latest date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/439609#M28395</link>
      <description>&lt;P&gt;In the EG Query Builder (screenshot below), drag the variables you want to group by (ex.&amp;nbsp;CASE_ID, Activity_Creator, Decisioned_By,&amp;nbsp;and Agency_Date (but not Suspect_Reason, since different values)&amp;nbsp;into selected columns (on the Select Data tab). Then, in the Summary column, select MAX. Notice the summary groups will be automatically selected (at the bottom). Now run the query and you should get the results you desire. If you want the full records, you could then left join that query result back with the original table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&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="screenshot.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18775iD2D60E2E45BA8815/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot.png" alt="screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 07:16:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Flaging-the-latest-date/m-p/439609#M28395</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2018-02-23T07:16:54Z</dc:date>
    </item>
  </channel>
</rss>

