<?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 Tabulate-nested rows  instead of placing them next to each other in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536350#M147388</link>
    <description>If you don't create listing output (hardly anybody does this nowadays) you can skip linesize and pagesize, too. &lt;BR /&gt;&lt;BR /&gt;AFAIK their is no option to get the output as you want it, maybe a custom template can help, but this is just an idea, I haven't used proc template lately and never for such tasks.</description>
    <pubDate>Mon, 18 Feb 2019 06:21:01 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2019-02-18T06:21:01Z</dc:date>
    <item>
      <title>Proc Tabulate-nested rows  instead of placing them next to each other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536343#M147386</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I create a summary table via Proc Tabulate.&lt;/P&gt;
&lt;P&gt;For region and &amp;nbsp;division class variables ,I want to&amp;nbsp;have nested rows &amp;nbsp;instead of placing them next to each other.&lt;/P&gt;
&lt;P&gt;However ,in the result I get a table where the&amp;nbsp; region and &amp;nbsp;division class variables are next to each other.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Rawtbl;
input ID 1-2 Region$ 4-12 Division$ 13-29  Type 31  expenditures 33-37;
cards;
1  Northeast New England      1 10
2  Northeast Middle Attlantic 1 20 
3  Northeast Middle Attlantic 2 30 
4  Northeast Middle Attlantic 2 40 
5  Northeast New England      2 50
6  West      Mountain         1 50 
7  West      Mountain         1 60 
8  West      Mountain         2 70 
9  West      Pacific          2 80
10 West      Pacific          1 90
11 West      Pacific          2 100 
;
Run;


options nodate pageno=1 linesize=80 pagesize=60;
proc tabulate data=Rawtbl format=dollar12. noseps;
class region division type;
var expenditures;
table region*division,
          type='Customer Type'*expenditures=' '*sum=' '/ rts=25 indent=4;
format  type usetype.;
title 'Energy Expenditures for Each Region';
title2 '(millions of dollars)';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Feb 2019 05:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536343#M147386</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-02-18T05:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate-nested rows  instead of placing them next to each other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536349#M147387</link>
      <description>&lt;P&gt;The INDENT argument works fine with LISTING output...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27239iDF89A7FF1F5C8F46/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;...just not with HTML output&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 499px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27240iE7B158A921BA7217/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;...as mentioned &lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=n1azfrb23t8082n1jk3xqn2hwei5.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Luhan&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 06:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536349#M147387</guid>
      <dc:creator>Luhan</dc:creator>
      <dc:date>2019-02-18T06:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate-nested rows  instead of placing them next to each other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536350#M147388</link>
      <description>If you don't create listing output (hardly anybody does this nowadays) you can skip linesize and pagesize, too. &lt;BR /&gt;&lt;BR /&gt;AFAIK their is no option to get the output as you want it, maybe a custom template can help, but this is just an idea, I haven't used proc template lately and never for such tasks.</description>
      <pubDate>Mon, 18 Feb 2019 06:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536350#M147388</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-02-18T06:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate-nested rows  instead of placing them next to each other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536430#M147419</link>
      <description>&lt;P&gt;Switch it into PROC REPORT .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Rawtbl;
input ID 1-2 Region$ 4-12 Division$ 13-29  Type 31  expenditures 33-37;
cards;
1  Northeast New England      1 10
2  Northeast Middle Attlantic 1 20 
3  Northeast Middle Attlantic 2 30 
4  Northeast Middle Attlantic 2 40 
5  Northeast New England      2 50
6  West      Mountain         1 50 
7  West      Mountain         1 60 
8  West      Mountain         2 70 
9  West      Pacific          2 80
10 West      Pacific          1 90
11 West      Pacific          2 100 
;
Run;


options nodate pageno=1 linesize=80 pagesize=60;
proc report data=Rawtbl nowd;
columns region division type,expenditures;
define region/group noprint;
define division/group ' ';
define type/across format= usetype.;
define expenditures/analysis sum format=dollar32. ' ';
compute before region;
line @1 region $40.;
endcomp;
title 'Energy Expenditures for Each Region';
title2 '(millions of dollars)';
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Feb 2019 11:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536430#M147419</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-02-18T11:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate-nested rows  instead of placing them next to each other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536434#M147421</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Rawtbl;
input ID 1-2 Region$ 4-12 Division$ 13-29  Type 31  expenditures 33-37;
cards;
1  Northeast New England      1 10
2  Northeast Middle Attlantic 1 20 
3  Northeast Middle Attlantic 2 30 
4  Northeast Middle Attlantic 2 40 
5  Northeast New England      2 50
6  West      Mountain         1 50 
7  West      Mountain         1 60 
8  West      Mountain         2 70 
9  West      Pacific          2 80
10 West      Pacific          1 90
11 West      Pacific          2 100 
;
Run;


options nodate pageno=1 linesize=80 pagesize=60;
proc report data=Rawtbl nowd;
columns region division type,expenditures;
define region/group noprint;
define division/group ' ' style={pretext='          ' asis=on};
define type/across format= usetype.;
define expenditures/analysis sum format=dollar32. ' ';
compute before region;
line @1 region $40.;
endcomp;
title 'Energy Expenditures for Each Region';
title2 '(millions of dollars)';
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Feb 2019 11:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-nested-rows-instead-of-placing-them-next-to-each/m-p/536434#M147421</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-02-18T11:24:54Z</dc:date>
    </item>
  </channel>
</rss>

