<?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: Count in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Count/m-p/91805#M257454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that date columns are actually SAS date variables, use the n() function. &lt;/P&gt;&lt;P&gt;n(date2011, date2012, date2013);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n(of date2011-date2013);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Sep 2013 17:33:46 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-09-24T17:33:46Z</dc:date>
    <item>
      <title>Count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count/m-p/91804#M257453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to add a variable that counts the number of variables each row has in a dataset, in excel I use =COUNT(B2:D2) to get the desired result.&amp;nbsp; Can someone help to do this in SAS?&amp;nbsp; I have 4 variables, pcpid, date2011,date2012, date2013.&amp;nbsp; I want to have a count from 0-3 regarding the dates.&amp;nbsp; If something was returned from a pcp the date field will be populated.&amp;nbsp; I will then sort by the count field to have the pcp that returned all three surveys at the top.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 17:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count/m-p/91804#M257453</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2013-09-24T17:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count/m-p/91805#M257454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that date columns are actually SAS date variables, use the n() function. &lt;/P&gt;&lt;P&gt;n(date2011, date2012, date2013);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n(of date2011-date2013);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 17:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count/m-p/91805#M257454</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-09-24T17:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count/m-p/91806#M257455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I was using transpose and count() then trying to merge back and not getting what I wanted.&amp;nbsp; I thought there was a simpler way that I was missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 17:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count/m-p/91806#M257455</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2013-09-24T17:46:43Z</dc:date>
    </item>
  </channel>
</rss>

