<?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 the first observation by id in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/select-the-first-observation-by-id/m-p/813550#M321100</link>
    <description>&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to select the first observation by secid and grp. I try this but it give me the first observation by secid only&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data first_by_group;
	set rolling12;
	by secid grp;
 
	if first.secid and first.grp then output;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 May 2022 18:13:32 GMT</pubDate>
    <dc:creator>sasphd</dc:creator>
    <dc:date>2022-05-16T18:13:32Z</dc:date>
    <item>
      <title>select the first observation by id</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-first-observation-by-id/m-p/813550#M321100</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to select the first observation by secid and grp. I try this but it give me the first observation by secid only&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data first_by_group;
	set rolling12;
	by secid grp;
 
	if first.secid and first.grp then output;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 May 2022 18:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-first-observation-by-id/m-p/813550#M321100</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-05-16T18:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: select the first observation by id</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-the-first-observation-by-id/m-p/813551#M321101</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if first.grp then output;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This give the first observation whenever GRP changes.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The way you had it written, you only get the first observation when BOTH secid and grp change.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 18:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-the-first-observation-by-id/m-p/813551#M321101</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-16T18:16:42Z</dc:date>
    </item>
  </channel>
</rss>

