<?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: Proc Computab in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399181#M96661</link>
    <description>Computab is a new one to me....:)
It depends on what you want. If you want a report - printed output to an ODS the PROC REPORT/PROC PRINT/PROC TABULATE are all options.&amp;nbsp;

If not, and you want a data set, then PROC TABULATE is still an option, though a data step is more efficient.&amp;nbsp;

Not 100% clear here, are you trying to sum the columns in each row or add a total column to the end of the report?</description>
    <pubDate>Wed, 27 Sep 2017 14:24:19 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-09-27T14:24:19Z</dc:date>
    <item>
      <title>Proc Computab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399166#M96650</link>
      <description>&lt;P&gt;Hello ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a SAS dataset that appear like this below and I am trying to sum the obs into a sum row inside the dataset.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data DL_test;&lt;BR /&gt;input Count $ '2018q1'n '2018q2'n '2018q3'n '2018q4'n ;&lt;BR /&gt;datalines;&lt;BR /&gt;'C:1'n 1 2 3 4 5&lt;BR /&gt;'C:2'n 1 2 3 4 5&lt;BR /&gt;'C:3'n 1 2 3 4 5&lt;BR /&gt;'C:4'n 1 2 3 4 5&lt;BR /&gt;'C:5'n 1 2 3 4 5&lt;BR /&gt;'C:6'n 1 2 3 4 5&lt;BR /&gt;'C:7'n 1 2 3 4 5&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using the computab procedure, but can't seem to figure out why I'm getting Blank observations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc computab data= DL_test notranspose out=DL_test_2 ;&lt;BR /&gt;rows 'C:1'n 'C:2'n 'C:3'n sum ;&lt;BR /&gt;Columns '2018q1'n '2018q2'n '2018q3'n '2018q4'n ;&lt;BR /&gt;RowBlk: Sum = Sum('C:1'n,'C:2'n,'C:3'n) ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doesn't the "&lt;SPAN&gt;notranspose"&lt;/SPAN&gt;&amp;nbsp;option prevent the transpostion . It appears this is happening and that is why the data is all zeros. Is there another way to modify this or another procudre that could be used?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 13:51:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399166#M96650</guid>
      <dc:creator>ICE1511</dc:creator>
      <dc:date>2017-09-27T13:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Computab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399181#M96661</link>
      <description>Computab is a new one to me....:)
It depends on what you want. If you want a report - printed output to an ODS the PROC REPORT/PROC PRINT/PROC TABULATE are all options.&amp;nbsp;

If not, and you want a data set, then PROC TABULATE is still an option, though a data step is more efficient.&amp;nbsp;

Not 100% clear here, are you trying to sum the columns in each row or add a total column to the end of the report?</description>
      <pubDate>Wed, 27 Sep 2017 14:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399181#M96661</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-27T14:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Computab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399184#M96662</link>
      <description>&lt;P&gt;Hey Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to sum the columns as to get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'C:1'n 1 2 3 4 5&lt;BR /&gt;'C:2'n 1 2 3 4 5&lt;BR /&gt;'C:3'n 1 2 3 4 5&lt;BR /&gt;'C:4'n 1 2 3 4 5&lt;BR /&gt;'C:5'n 1 2 3 4 5&lt;BR /&gt;'C:6'n 1 2 3 4 5&lt;BR /&gt;'C:7'n 1 2 3 4 5&lt;/P&gt;&lt;P&gt;SUM 7 14 21 28 35&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and include this inside the dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 14:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399184#M96662</guid>
      <dc:creator>ICE1511</dc:creator>
      <dc:date>2017-09-27T14:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Computab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399206#M96672</link>
      <description>&lt;P&gt;Here's a manual way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data DL_test;
input Count $ Y2018q1 Y2018q2 Y2018q3 Y2018q4 ;
datalines;
'C:1'n 1 2 3 4 5
'C:2'n 1 2 3 4 5
'C:3'n 1 2 3 4 5
'C:4'n 1 2 3 4 5
'C:5'n 1 2 3 4 5
'C:6'n 1 2 3 4 5
'C:7'n 1 2 3 4 5
;
run;

proc means data=dl_test noprint;
var Y2018:;
output out=sum (drop = _:) sum=;
run;

data want;
set dl_test sum (in=b);
if b then count='Total';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Sep 2017 14:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399206#M96672</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-27T14:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Computab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399217#M96677</link>
      <description>&lt;P&gt;Thanks Reeza- that should work for this problem as the data is not large.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 15:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Computab/m-p/399217#M96677</guid>
      <dc:creator>ICE1511</dc:creator>
      <dc:date>2017-09-27T15:07:33Z</dc:date>
    </item>
  </channel>
</rss>

