<?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: sorting by multiple variable and getting the first observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/631041#M186897</link>
    <description>&lt;P&gt;Okay good, I'm glad we figured the need. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 17:54:49 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-03-10T17:54:49Z</dc:date>
    <item>
      <title>sorting by multiple variable and getting the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/630775#M186782</link>
      <description>&lt;P&gt;data work.resiSorted;&lt;BR /&gt;set work.resi;&lt;BR /&gt;by ID Career descending Term;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having many columns in work.resi.&lt;/P&gt;&lt;P&gt;My data get sorted as I wish.&lt;/P&gt;&lt;P&gt;When I want to get the 1st ID/career/Term details of the observation:-&amp;nbsp; it is not working;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data= work.resisorted;&lt;/P&gt;&lt;P&gt;by ID;&lt;/P&gt;&lt;P&gt;if first.id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 23:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/630775#M186782</guid>
      <dc:creator>USHAKS</dc:creator>
      <dc:date>2020-03-09T23:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: sorting by multiple variable and getting the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/630776#M186783</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/28913"&gt;@USHAKS&lt;/a&gt;&amp;nbsp; Do you mean you are after this by any chance&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=work.resi out=resi_sorted;
by id career descending term;
run;


data work.want;
set work.resi_sorted;
by ID ;
if first.id;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 00:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/630776#M186783</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-10T00:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: sorting by multiple variable and getting the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/631039#M186895</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 17:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/631039#M186895</guid>
      <dc:creator>USHAKS</dc:creator>
      <dc:date>2020-03-10T17:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: sorting by multiple variable and getting the first observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/631041#M186897</link>
      <description>&lt;P&gt;Okay good, I'm glad we figured the need. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 17:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sorting-by-multiple-variable-and-getting-the-first-observation/m-p/631041#M186897</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-10T17:54:49Z</dc:date>
    </item>
  </channel>
</rss>

