<?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: Sum Rowwise data when the columnname is a date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300341#M63419</link>
    <description>&lt;P&gt;Use the SUM function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(var1, var2, ..., varN);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS doesn't allow variable names of that type. It will transform them when imported - it would be easier if you modified them manually so you have a system you understand.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you declare an array you can&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;array date_vars(12) date1-date12;&lt;/P&gt;
&lt;P&gt;total=sum( of date_vars(*));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other ways to list the variables based on the convention you choose. Search VARIABLE LIST on here or in SAS documentation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2016 12:09:54 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-09-23T12:09:54Z</dc:date>
    <item>
      <title>Sum Rowwise data when the columnname is a date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300333#M63415</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know how can we sum rowwise data in SAS when the columns are dates. Below is how my Excel file looks like?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Dress_ID&lt;/TD&gt;&lt;TD&gt;29/8/2013&lt;/TD&gt;&lt;TD&gt;31/8/2013&lt;/TD&gt;&lt;TD&gt;2/9/2013&lt;/TD&gt;&lt;TD&gt;4/9/2013&lt;/TD&gt;&lt;TD&gt;6/9/2013&lt;/TD&gt;&lt;TD&gt;8/9/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1006032852&lt;/TD&gt;&lt;TD&gt;2114&lt;/TD&gt;&lt;TD&gt;2274&lt;/TD&gt;&lt;TD&gt;2491&lt;/TD&gt;&lt;TD&gt;2660&lt;/TD&gt;&lt;TD&gt;2727&lt;/TD&gt;&lt;TD&gt;2887&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1212192089&lt;/TD&gt;&lt;TD&gt;151&lt;/TD&gt;&lt;TD&gt;275&lt;/TD&gt;&lt;TD&gt;570&lt;/TD&gt;&lt;TD&gt;750&lt;/TD&gt;&lt;TD&gt;813&lt;/TD&gt;&lt;TD&gt;1066&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1190380701&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;966005983&lt;/TD&gt;&lt;TD&gt;1005&lt;/TD&gt;&lt;TD&gt;1128&lt;/TD&gt;&lt;TD&gt;1326&lt;/TD&gt;&lt;TD&gt;1455&lt;/TD&gt;&lt;TD&gt;1507&lt;/TD&gt;&lt;TD&gt;1621&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;876339541&lt;/TD&gt;&lt;TD&gt;996&lt;/TD&gt;&lt;TD&gt;1175&lt;/TD&gt;&lt;TD&gt;1304&lt;/TD&gt;&lt;TD&gt;1396&lt;/TD&gt;&lt;TD&gt;1432&lt;/TD&gt;&lt;TD&gt;1559&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to do sum row wise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 11:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300333#M63415</guid>
      <dc:creator>AdityaKir</dc:creator>
      <dc:date>2016-09-23T11:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Rowwise data when the columnname is a date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300341#M63419</link>
      <description>&lt;P&gt;Use the SUM function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(var1, var2, ..., varN);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS doesn't allow variable names of that type. It will transform them when imported - it would be easier if you modified them manually so you have a system you understand.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you declare an array you can&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;array date_vars(12) date1-date12;&lt;/P&gt;
&lt;P&gt;total=sum( of date_vars(*));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other ways to list the variables based on the convention you choose. Search VARIABLE LIST on here or in SAS documentation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 12:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300341#M63419</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-23T12:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Rowwise data when the columnname is a date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300347#M63423</link>
      <description>&lt;P&gt;It is a good idea for you to import that data from Excel and show us what the dataset looks like. &amp;nbsp;That could be a picture for all I know, Excel has no structure or control so it is not possible to work from that point. &amp;nbsp;Once you have a dataset, look at what the variable names are, if they are imported as varX then your problem is a very simple one:&lt;/P&gt;
&lt;PRE&gt;result=sum(of var:);&lt;/PRE&gt;
&lt;P&gt;If they are not, then you may have work in manipulating the data into a useable format.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 12:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300347#M63423</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-09-23T12:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Rowwise data when the columnname is a date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300383#M63433</link>
      <description>Remember that SAS is not Excel. You'll be better off restructuring your data in a normalized way - by making a date column. Then you'll have lots possibilities to do any calculations you need. Summarization is usually a task for a report so you could use PROC PRINT if you wish to keep the details or TABULATE for aggregation only reports.</description>
      <pubDate>Fri, 23 Sep 2016 14:18:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300383#M63433</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-09-23T14:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Rowwise data when the columnname is a date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300391#M63435</link>
      <description>&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 14:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-Rowwise-data-when-the-columnname-is-a-date/m-p/300391#M63435</guid>
      <dc:creator>AdityaKir</dc:creator>
      <dc:date>2016-09-23T14:39:39Z</dc:date>
    </item>
  </channel>
</rss>

