<?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: how to pick &amp;quot;Y&amp;quot; from a variable if they are multiple observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583936#M166268</link>
    <description>&lt;P&gt;If an ID has multiple Y flags what do you want for output? All N flags but more than 2 (your description does not actually cover this case as only mention similar for the second id. What if the 5th id has 4 flags?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best to provide an example of what the actual output should look like for given example input.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2019 14:54:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-08-26T14:54:36Z</dc:date>
    <item>
      <title>how to pick "Y" from a variable if they are multiple observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583932#M166266</link>
      <description>&lt;P&gt;is there any way to pick "Y" from a variable with same id,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a id variable and flag variable with multiple observations&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;101&amp;nbsp; Y&lt;/P&gt;
&lt;P&gt;101&amp;nbsp; &amp;nbsp;N&lt;/P&gt;
&lt;P&gt;101&amp;nbsp; N&lt;/P&gt;
&lt;P&gt;102 N&lt;/P&gt;
&lt;P&gt;102 N&lt;/P&gt;
&lt;P&gt;103 Y&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there a way where we can pick 101 and only "Y" from it and ignore "N" and in second id only take one record "N" and omitt the duplicate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 14:46:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583932#M166266</guid>
      <dc:creator>vraj1</dc:creator>
      <dc:date>2019-08-26T14:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to pick "Y" from a variable if they are multiple observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583934#M166267</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id flag $;
datalines;
101 Y
101 N
101 N
102 N
102 N
103 Y
;

proc sort data=have;
	by id flag;
run;

data want;
	set have;
	if last.id;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Aug 2019 14:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583934#M166267</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-26T14:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to pick "Y" from a variable if they are multiple observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583936#M166268</link>
      <description>&lt;P&gt;If an ID has multiple Y flags what do you want for output? All N flags but more than 2 (your description does not actually cover this case as only mention similar for the second id. What if the 5th id has 4 flags?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best to provide an example of what the actual output should look like for given example input.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 14:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583936#M166268</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-26T14:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to pick "Y" from a variable if they are multiple observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583939#M166269</link>
      <description>&lt;P&gt;+1&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp; Sir. I was gonna ask that question as I was wary too. You beat me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/62004"&gt;@vraj1&lt;/a&gt;&amp;nbsp; &amp;nbsp;is there&amp;nbsp; a trick like,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pick all Y's if multiples with an N or not,&amp;nbsp; and only distinct N if all N's?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 14:56:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pick-quot-Y-quot-from-a-variable-if-they-are-multiple/m-p/583939#M166269</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-26T14:56:52Z</dc:date>
    </item>
  </channel>
</rss>

