<?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: Using sum function to count total numbers in different columns in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858954#M37940</link>
    <description>&lt;P&gt;Thank you. That worked!!&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2023 15:09:41 GMT</pubDate>
    <dc:creator>Sandeep77</dc:creator>
    <dc:date>2023-02-15T15:09:41Z</dc:date>
    <item>
      <title>Using sum function to count total numbers in different columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858936#M37934</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have a dataset with different months. Each account number shows 1,2,3, etc which indicates the number of letters send to those accounts. I want to try to find the total number of letters send in each month. Basically, I want to get the sum like in March the total letter send is 2, in May it is 6. I tried the code mention below and it shows me for 1 month but when I try to add all months, its&amp;nbsp; goes in not responding.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
select sum(FEBvols)
from No_Letter;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="64" height="19" class="xl63" style="height: 14.5pt; width: 48pt;"&gt;JANvols&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;FEBvols&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;MARvols&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;APRvols&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;MAYvols&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl63" style="height: 14.5pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl63" style="height: 14.5pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl63" style="height: 14.5pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl63" style="height: 14.5pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 15 Feb 2023 14:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858936#M37934</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-02-15T14:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using sum function to count total numbers in different columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858937#M37935</link>
      <description>&lt;P&gt;Please provide data as working SAS data step code, as you have done in the past.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 14:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858937#M37935</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-15T14:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using sum function to count total numbers in different columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858945#M37936</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Test;&lt;BR /&gt;infile datalines dsd truncover;&lt;BR /&gt;input JANvols FEBvols MARvols APRvols MAYvols&lt;BR /&gt;;&lt;BR /&gt;datalines;&lt;BR /&gt;0 0 2 2 1&lt;BR /&gt;0 0 0 0 0&lt;BR /&gt;0 0 0 0 0&lt;BR /&gt;0 0 0 0 5&lt;BR /&gt;0 0 0 0 0&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 14:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858945#M37936</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-02-15T14:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using sum function to count total numbers in different columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858946#M37937</link>
      <description>&lt;P&gt;Thank you. Don't make me ask repeatedly for data in the proper form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=test sum;
    var janvols--mayvols;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I suggest that you do not put calendar information into variable names. You would be far better off having a data set with a variable named MONTH which has the names of the months, or even better if this variable MONTH has a valid numeric SAS date value indicating the month.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 14:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858946#M37937</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-15T14:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using sum function to count total numbers in different columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858954#M37940</link>
      <description>&lt;P&gt;Thank you. That worked!!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 15:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-sum-function-to-count-total-numbers-in-different-columns/m-p/858954#M37940</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-02-15T15:09:41Z</dc:date>
    </item>
  </channel>
</rss>

