<?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: Create new variable - count in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-new-variable-count/m-p/732828#M228359</link>
    <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p18xi2516ihygyn1qg1b1nby326k.htm&amp;amp;locale=en" target="_self"&gt;Countw Function&lt;/A&gt; like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   count = countw(student_names, ',');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 11 Apr 2021 07:34:01 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2021-04-11T07:34:01Z</dc:date>
    <item>
      <title>Create new variable - count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-new-variable-count/m-p/732822#M228358</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a new variable (Students_Count) which counts the number of students in the Student_Names column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57344iD55D1BA4E82F709B/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS.PNG" alt="SAS.PNG" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result that I need:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS result.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57343i9C190772EA7A559D/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS result.PNG" alt="SAS result.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any advice would be greatly appreciated.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Apr 2021 07:11:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-new-variable-count/m-p/732822#M228358</guid>
      <dc:creator>mfcy</dc:creator>
      <dc:date>2021-04-11T07:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable - count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-new-variable-count/m-p/732828#M228359</link>
      <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p18xi2516ihygyn1qg1b1nby326k.htm&amp;amp;locale=en" target="_self"&gt;Countw Function&lt;/A&gt; like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   count = countw(student_names, ',');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Apr 2021 07:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-new-variable-count/m-p/732828#M228359</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-04-11T07:34:01Z</dc:date>
    </item>
  </channel>
</rss>

