<?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 possible values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70604#M20312</link>
    <description>I suggest you check out the FREQ procedure. While it is more commonly used to do counts of each distinct value of a variable, it can also output a dataset that contains the distinct values of a variable, one per row. So if you count up the number of rows then you will have your answer.</description>
    <pubDate>Tue, 07 Sep 2010 22:23:09 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2010-09-07T22:23:09Z</dc:date>
    <item>
      <title>Count possible values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70603#M20311</link>
      <description>I feel like this is a pretty simple question but I can't seem to find a simple answer.&lt;BR /&gt;
&lt;BR /&gt;
I have a dataset with a large number of variables.  For each variable I'd like to know how many possible values it can take on.  So if a variable is either '1,' '2,' or 'NA' then the result would be 3 for that variable.  And so on for the entire list of variables.&lt;BR /&gt;
&lt;BR /&gt;
Seems simple enough, but I can't figure out a good way to do it.  Any advice out there?</description>
      <pubDate>Tue, 07 Sep 2010 21:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70603#M20311</guid>
      <dc:creator>GVeers</dc:creator>
      <dc:date>2010-09-07T21:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count possible values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70604#M20312</link>
      <description>I suggest you check out the FREQ procedure. While it is more commonly used to do counts of each distinct value of a variable, it can also output a dataset that contains the distinct values of a variable, one per row. So if you count up the number of rows then you will have your answer.</description>
      <pubDate>Tue, 07 Sep 2010 22:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70604#M20312</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2010-09-07T22:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Count possible values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70605#M20313</link>
      <description>The SAS support website &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  can help - check it's SEARCH facility where you will find SAS-hosted documentation and supplemental topic-related technical / conference material.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
count unique values site:sas.com</description>
      <pubDate>Tue, 07 Sep 2010 22:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70605#M20313</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-09-07T22:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count possible values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70606#M20314</link>
      <description>Yes.&lt;BR /&gt;
@data _null_;  has already have an answer in the previous posts.&lt;BR /&gt;
It is his/her answer.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc freq data=sashelp.class nlevels;&lt;BR /&gt;
 tables _all_  /nocum nopercent;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp   From data _null_;</description>
      <pubDate>Wed, 08 Sep 2010 05:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70606#M20314</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-09-08T05:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count possible values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70607#M20315</link>
      <description>I did do a search but clearly not the right one!  That is amazingly helpful.  Thanks guys.</description>
      <pubDate>Wed, 08 Sep 2010 12:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-possible-values/m-p/70607#M20315</guid>
      <dc:creator>GVeers</dc:creator>
      <dc:date>2010-09-08T12:59:02Z</dc:date>
    </item>
  </channel>
</rss>

