<?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: extra row in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63316#M13769</link>
    <description>Hi:&lt;BR /&gt;
   Do you want a final output dataset? Do you want a final REPORT -- using ODS and PROC REPORT or PROC TABULATE or PROC PRINT? What is the ultimate disposition of the information you want to convey?&lt;BR /&gt;
&lt;BR /&gt;
  You show some variable names, but no data. Is there one observation for each combo of region, bsm, lname, fname, city, state, zip and prdgroup? Are there multiple observations? Do you want to replicate the data in a dataset or table, but only add a summary observation? Do you want a report with a summary row? &lt;BR /&gt;
&lt;BR /&gt;
  What has your approach been so far? (PROC PRINT, PROC SQL, PROC REPORT, PROC TABULATE)?? Without some idea of what the data looks like and whether it needs to be summarized or is already summarized and some idea of whether you want a dataset or a report,  I feel that there's not enough information to offer a suggestion.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Tue, 11 Aug 2009 23:31:48 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2009-08-11T23:31:48Z</dc:date>
    <item>
      <title>extra row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63315#M13768</link>
      <description>region bsm lname fname city state zip prdgroup  totaljan-june   2009-01..2009-06&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
for the above fileds:&lt;BR /&gt;
prdgrp has two categories:&lt;BR /&gt;
competitor&lt;BR /&gt;
mydrug&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
how  to create an extra row "total" under productgoup which is sum of competitor,mydrug.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
region bsm lname fname city state zip prdgp  total jan-june    2009-01...2009-06&lt;BR /&gt;
                                                competitor     2,000              50&lt;BR /&gt;
                                                 mydrug        1,000              75 &lt;BR /&gt;
                                                  Total           3,000             125</description>
      <pubDate>Tue, 11 Aug 2009 20:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63315#M13768</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-08-11T20:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: extra row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63316#M13769</link>
      <description>Hi:&lt;BR /&gt;
   Do you want a final output dataset? Do you want a final REPORT -- using ODS and PROC REPORT or PROC TABULATE or PROC PRINT? What is the ultimate disposition of the information you want to convey?&lt;BR /&gt;
&lt;BR /&gt;
  You show some variable names, but no data. Is there one observation for each combo of region, bsm, lname, fname, city, state, zip and prdgroup? Are there multiple observations? Do you want to replicate the data in a dataset or table, but only add a summary observation? Do you want a report with a summary row? &lt;BR /&gt;
&lt;BR /&gt;
  What has your approach been so far? (PROC PRINT, PROC SQL, PROC REPORT, PROC TABULATE)?? Without some idea of what the data looks like and whether it needs to be summarized or is already summarized and some idea of whether you want a dataset or a report,  I feel that there's not enough information to offer a suggestion.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 11 Aug 2009 23:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63316#M13769</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-08-11T23:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: extra row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63317#M13770</link>
      <description>Cynthia,&lt;BR /&gt;
   I have a dataset with these variables:&lt;BR /&gt;
firstname,lastname address1 city state zip region ghtm productgroup year year_month mg_dispensed.&lt;BR /&gt;
&lt;BR /&gt;
before going to the final step which being generating report(I thought of using proc report) I used proc summary with "var" mg_dispensed and rest all as class variables.&lt;BR /&gt;
&lt;BR /&gt;
Productgroup has two values (competitor and my drug).year has only one value 2009.&lt;BR /&gt;
&lt;BR /&gt;
The report will be displayed at year and year_month .In the productgroup, I should be able to display total as shown below.&lt;BR /&gt;
(var1 to varn are firstname,lastname address1 city state zip region ghtm )to optimize space I use this representation.&lt;BR /&gt;
&lt;BR /&gt;
                                    total &lt;BR /&gt;
var1--varn prdgrp      jan2009-mar2009      2009-01  2009-02 2009-03&lt;BR /&gt;
               comp             120                      20         40             60&lt;BR /&gt;
               mydrug          190                      60          50             80&lt;BR /&gt;
               total               310                      80         90             140&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
total jan2009-june2009 is sum of individual months for comp,mydrug.&lt;BR /&gt;
&lt;BR /&gt;
The data is messy , there is a chance of having more than one observation for each combo of region, bsm, lname, fname, city, state, zip and prdgroup.&lt;BR /&gt;
&lt;BR /&gt;
SASPhile</description>
      <pubDate>Wed, 12 Aug 2009 00:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63317#M13770</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-08-12T00:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: extra row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63318#M13771</link>
      <description>Hi:&lt;BR /&gt;
  This data seems familiar...with the detail information on address and bsm and drugs and physicians. I think the only thing that's missing from this list of data is terr_id. I'm still having a hard time figuring out whether you want a detail report or a summary report. Whether you want ACROSS variables in PROC REPORT or COLUMN variables in PROC TABULATE? Is the "JAN2009-MAR2009" column in the data or must it be summarized from the data? &lt;BR /&gt;
 &lt;BR /&gt;
  Without seeing some of the actual input data (instead of just the column names), it's hard to understand how this data is different from any of this other data in these previous postings...or why the previous examples of PROC REPORT and PROC TABULATE don't work for this data. Everything in these previous postings about REPORT vs TABULATE still applies:&lt;BR /&gt;
 &lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=20472俸" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=20472俸&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=20574偞" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=20574偞&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=23216媰" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=23216媰&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=20499倓" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=20499倓&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=20354侂" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=20354侂&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 12 Aug 2009 15:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extra-row/m-p/63318#M13771</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-08-12T15:33:11Z</dc:date>
    </item>
  </channel>
</rss>

