<?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: Summary Table Repeat Variable Names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399324#M96715</link>
    <description>&lt;P&gt;And what is the sas program code generating these results?&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2017 19:59:02 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2017-09-27T19:59:02Z</dc:date>
    <item>
      <title>Summary Table Repeat Variable Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399321#M96712</link>
      <description>&lt;P&gt;Using SAS EG 7.1 and trying to make the variables repeat values in a summary table. It is currently only showing the first value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;What I am getting now&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Origin&lt;/TD&gt;&lt;TD&gt;Destination&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;New York&lt;/TD&gt;&lt;TD&gt;Florida&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Colorado&lt;/TD&gt;&lt;TD&gt;638&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Kentucky&lt;/TD&gt;&lt;TD&gt;194&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Origin&lt;/TD&gt;&lt;TD&gt;Destination&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;New York&lt;/TD&gt;&lt;TD&gt;Florida&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;New York&lt;/TD&gt;&lt;TD&gt;Colorado&lt;/TD&gt;&lt;TD&gt;638&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;New York&lt;/TD&gt;&lt;TD&gt;Kentucky&lt;/TD&gt;&lt;TD&gt;194&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 27 Sep 2017 19:39:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399321#M96712</guid>
      <dc:creator>Amber_Nicole94</dc:creator>
      <dc:date>2017-09-27T19:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Table Repeat Variable Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399322#M96713</link>
      <description>&lt;P&gt;You should describe how you are doing that summary. There a number of different ways to summarize data and we need a starting point. If you are using tasks you may be missing an option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And are you creating a data set or a report?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 19:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399322#M96713</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-09-27T19:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Table Repeat Variable Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399323#M96714</link>
      <description>&lt;P&gt;I have my starting point whch is a data set that I have created and manipulated. Then I have selected Tasks &amp;gt; Describe &amp;gt; Summary Tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Tab:&lt;/P&gt;&lt;P&gt;Analysis Variable =&amp;nbsp;Cost&lt;/P&gt;&lt;P&gt;Classification Variables =&amp;nbsp;Origin, Destination&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Summary Tables Tab:&lt;/P&gt;&lt;P&gt;Placed them where&amp;nbsp;I want them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Run.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 19:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399323#M96714</guid>
      <dc:creator>Amber_Nicole94</dc:creator>
      <dc:date>2017-09-27T19:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Table Repeat Variable Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399324#M96715</link>
      <description>&lt;P&gt;And what is the sas program code generating these results?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 19:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399324#M96715</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-09-27T19:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Table Repeat Variable Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399328#M96716</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TITLE;
TITLE1 "Summary Tables";
FOOTNOTE;
FOOTNOTE1 "Generated by the SAS System (&amp;amp;_SASSERVERNAME, &amp;amp;SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
/* -------------------------------------------------------------------
   Code generated by SAS Task

   Generated on: Wednesday, September 27, 2017 at 3:40:58 PM
   By task: Summary Tables (2)

   Input Data: SASApp:WORK.QUERY_FOR_APPEND_TABLE_0001
   Server:  SASApp
   ------------------------------------------------------------------- */


/* -------------------------------------------------------------------
   Run the tabulate procedure
   ------------------------------------------------------------------- */
PROC TABULATE
DATA=WORK.QUERY_FOR_APPEND_TABLE_0001
	
	;
	
	VAR Units "COST"n;
	CLASS Origin /	ORDER=UNFORMATTED MISSING;
	CLASS Destination /	ORDER=UNFORMATTED MISSING MLF;
	TABLE /* Row Dimension */
'Origin'n*(
    Destination 
  ALL={LABEL="Total (ALL)"}),
/* Column Dimension */
COST*
  Sum;
	;

RUN;
/* -------------------------------------------------------------------
   End of task code
   ------------------------------------------------------------------- */
RUN; QUIT;
TITLE; FOOTNOTE;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399328#M96716</guid>
      <dc:creator>Amber_Nicole94</dc:creator>
      <dc:date>2017-09-27T20:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Table Repeat Variable Names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399339#M96718</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This is something you might want to try with the List Report task instead of Summary Tables task. Or else learn PROC REPORT code. This is easier to do with PROC REPORT than with TABULATE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; As an example -- the top table is PROC TABULATE on a subset of SASHELP.SHOES and the bottom table is the PROC REPORT TABLE showing the region on each row, as you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tab_vs_report.png" style="width: 295px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15466iFC736519F21F7B13/image-size/large?v=v2&amp;amp;px=999" role="button" title="tab_vs_report.png" alt="tab_vs_report.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title; footnote;

PROC TABULATE DATA=sashelp.shoes;
    where product in ('Boot' 'Sandal' 'Slipper') and
	      region in ('Asia' 'Canada');
	VAR sales;
	CLASS region product	 ;
	TABLE /* Row Dimension */
    region*(product ALL={LABEL="Total (ALL)"}),
    sales* Sum;
RUN;

proc report data=sashelp.shoes;
    where product in ('Boot' 'Sandal' 'Slipper') and
	      region in ('Asia' 'Canada');
  column region show_region product sales;
  define region / group noprint;
  define show_region/ computed 'Region' style(column)=Header;
  define product / group style(column)=Header;
  define sales / sum f=dollar14.;
  break after region / summarize style=Header;
  compute before region;
    hold = region;
  endcomp;
  compute show_region / character length=30;
    show_region = hold;
  endcomp;
  compute after region;
     show_region = "Total (ALL)";
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Hope this helps,&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-Table-Repeat-Variable-Names/m-p/399339#M96718</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-09-27T20:57:38Z</dc:date>
    </item>
  </channel>
</rss>

