<?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 Horizontal count of variables with non-missing values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Horizontal-count-of-variables-with-non-missing-values/m-p/562378#M74943</link>
    <description>&lt;P&gt;I need to generate a new variabel that horizontally count the number of variabels out of a total of 9 numeric variabels that contains a none missing value. I've figured out to do so with a missing value, but how can I change the code, so instead of '.' it will be any value "not equal" to a missing value?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;set want;&lt;BR /&gt;countvar = countc(catt(of var1 - var9), '.');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I still haven't worked with arrays, so I would appreciate a very simple code, ex based on the code above)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 18:21:29 GMT</pubDate>
    <dc:creator>Biniie</dc:creator>
    <dc:date>2019-05-29T18:21:29Z</dc:date>
    <item>
      <title>Horizontal count of variables with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Horizontal-count-of-variables-with-non-missing-values/m-p/562378#M74943</link>
      <description>&lt;P&gt;I need to generate a new variabel that horizontally count the number of variabels out of a total of 9 numeric variabels that contains a none missing value. I've figured out to do so with a missing value, but how can I change the code, so instead of '.' it will be any value "not equal" to a missing value?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;set want;&lt;BR /&gt;countvar = countc(catt(of var1 - var9), '.');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I still haven't worked with arrays, so I would appreciate a very simple code, ex based on the code above)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 18:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Horizontal-count-of-variables-with-non-missing-values/m-p/562378#M74943</guid>
      <dc:creator>Biniie</dc:creator>
      <dc:date>2019-05-29T18:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Horizontal count of variables with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Horizontal-count-of-variables-with-non-missing-values/m-p/562381#M74945</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274244"&gt;@Biniie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I need to generate a new variabel that horizontally count the number of variabels out of a total of 9 variabels that contains a none missing value. I've figured out to do so with a missing value, but how can I change the code, so instead of '.' it will be any value "not equal" to a missing value?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;set want;&lt;BR /&gt;countvar = countc(catt(of var1 - var9), '.');&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I still haven't worked with arrays, so I would appreciate a very simple code, ex based on the code above)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Use the CMISS() function.&amp;nbsp; It can handle both numeric and character variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;number_missing=cmiss(of var1-var9);
number_not_missing=9 - number_missing;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 18:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Horizontal-count-of-variables-with-non-missing-values/m-p/562381#M74945</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-29T18:15:44Z</dc:date>
    </item>
  </channel>
</rss>

