<?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 report - Long instead of wide in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545902#M8113</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/81036"&gt;@hwangnyc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Ballardw,&lt;BR /&gt;&lt;BR /&gt;THANK YOU! This is perfect. Can you tell me how I can sum across the rows?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;proc tabulate data=dataexercise;
   class week Status ;
   table
       week=' ',
      Status=' ' All='Row total'
      /box=week;
run;&lt;/PRE&gt;
&lt;P&gt;will do a row count&amp;nbsp;total for all records in the week&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=dataexercise;
   class week Status ;
   table
       week=' ' all='Column Total',
      Status=' '
      /box=week;
run;&lt;/PRE&gt;
&lt;P&gt;Will do the total across the weeks and;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=dataexercise;
   class week Status ;
   table
       week=' ' all='Column Total',
      Status=' ' all='Row Total'
      /box=week;
run;&lt;/PRE&gt;
&lt;P&gt;Will provide a total of both row and column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All can be used in parentheses to&amp;nbsp; work with different groups of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware that Proc Tabulate by default will only include records that have values for all of the Class variables by default.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2019 17:18:24 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-03-25T17:18:24Z</dc:date>
    <item>
      <title>Proc report - Long instead of wide</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545859#M8105</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a report using PROC Report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the data and code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data dataexercise;&lt;BR /&gt;input Week @@ Status $;&lt;BR /&gt;datalines;&lt;BR /&gt;1 Accept&lt;BR /&gt;2 Accept&lt;BR /&gt;3 Accept&lt;BR /&gt;4 Accept&lt;BR /&gt;1 Reject&lt;BR /&gt;2 Reject&lt;BR /&gt;3 Accept&lt;BR /&gt;4 Accept&lt;BR /&gt;1 Accept&lt;BR /&gt;2 Accept&lt;BR /&gt;3 Accept&lt;BR /&gt;4 Accept&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc tabulate data=dataexercise;&lt;BR /&gt;class week Status ;&lt;BR /&gt;table&lt;BR /&gt;week*Status;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Instead of the weeks going horizontally. This is what I would like:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Week&lt;/TD&gt;&lt;TD&gt;Accept&lt;/TD&gt;&lt;TD&gt;Reject&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 15:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545859#M8105</guid>
      <dc:creator>hwangnyc</dc:creator>
      <dc:date>2019-03-25T15:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report - Long instead of wide</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545861#M8106</link>
      <description>&lt;PRE&gt;proc tabulate data=dataexercise;
   class week Status ;
   table
       week=' ',
      Status=' '
      /box=week;
run;&lt;/PRE&gt;
&lt;P&gt;The comma is used in tabulate to separate the role from page, row or column. With only two dimensions the first is row, and second is column. The =' ' suppresses the variable label and the /box= option places the label of the variable Week inside the upper left corner of the table.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 15:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545861#M8106</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-25T15:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report - Long instead of wide</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545880#M8110</link>
      <description>Hi Ballardw,&lt;BR /&gt;&lt;BR /&gt;THANK YOU! This is perfect. Can you tell me how I can sum across the rows?</description>
      <pubDate>Mon, 25 Mar 2019 15:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545880#M8110</guid>
      <dc:creator>hwangnyc</dc:creator>
      <dc:date>2019-03-25T15:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report - Long instead of wide</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545902#M8113</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/81036"&gt;@hwangnyc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Ballardw,&lt;BR /&gt;&lt;BR /&gt;THANK YOU! This is perfect. Can you tell me how I can sum across the rows?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;proc tabulate data=dataexercise;
   class week Status ;
   table
       week=' ',
      Status=' ' All='Row total'
      /box=week;
run;&lt;/PRE&gt;
&lt;P&gt;will do a row count&amp;nbsp;total for all records in the week&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=dataexercise;
   class week Status ;
   table
       week=' ' all='Column Total',
      Status=' '
      /box=week;
run;&lt;/PRE&gt;
&lt;P&gt;Will do the total across the weeks and;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=dataexercise;
   class week Status ;
   table
       week=' ' all='Column Total',
      Status=' ' all='Row Total'
      /box=week;
run;&lt;/PRE&gt;
&lt;P&gt;Will provide a total of both row and column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All can be used in parentheses to&amp;nbsp; work with different groups of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware that Proc Tabulate by default will only include records that have values for all of the Class variables by default.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 17:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-report-Long-instead-of-wide/m-p/545902#M8113</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-25T17:18:24Z</dc:date>
    </item>
  </channel>
</rss>

