<?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: Number of one Variable with a condition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272602#M54256</link>
    <description>&lt;P&gt;Then pick up the first obs wthin each group firstly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=123 out=_123 nodupkey;
 by def;
run;

proc freq data=_123;
table issr_id;
where def=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 May 2016 02:22:13 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-05-24T02:22:13Z</dc:date>
    <item>
      <title>Number of one Variable with a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272444#M54188</link>
      <description>&lt;P&gt;Hey!&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code up to now:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=123;&lt;BR /&gt;table issr_id;&lt;BR /&gt;where def=1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know the total number of issr_id with the condition def=1.&lt;/P&gt;&lt;P&gt;But the Problem is, there are some issr_id with have more then one def=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get the total number of issr_id with def=1, without issr_id with the same number are counted muliple times?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you get&amp;nbsp;my question.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 15:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272444#M54188</guid>
      <dc:creator>smadlindl0</dc:creator>
      <dc:date>2016-05-23T15:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Number of one Variable with a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272451#M54189</link>
      <description>Not sure what you actually will count the frequency on.&lt;BR /&gt;What does uniquely identifies row in the input table?</description>
      <pubDate>Mon, 23 May 2016 15:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272451#M54189</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-05-23T15:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Number of one Variable with a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272455#M54192</link>
      <description>&lt;P&gt;It sounds like you're trying to get a frequency of unique issr_ids. Am I correct in assuming this? If so, before you do the proc freq, you could use PROC SQL and select distinct issr_ids, or a datastep and use by group processing to filter out issr_ids that are identical. Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 16:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272455#M54192</guid>
      <dc:creator>JediApprentice</dc:creator>
      <dc:date>2016-05-23T16:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Number of one Variable with a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272456#M54193</link>
      <description>&lt;P&gt;It sounds like you are looking for just a single number as the output.&amp;nbsp; If so, this might do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select count(distinct(issr_id)) from have where def=1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 16:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272456#M54193</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-05-23T16:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Number of one Variable with a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272602#M54256</link>
      <description>&lt;P&gt;Then pick up the first obs wthin each group firstly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=123 out=_123 nodupkey;
 by def;
run;

proc freq data=_123;
table issr_id;
where def=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2016 02:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-one-Variable-with-a-condition/m-p/272602#M54256</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-05-24T02:22:13Z</dc:date>
    </item>
  </channel>
</rss>

