<?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 pint option grand_total in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789411#M252606</link>
    <description>&lt;P&gt;The label is displayed in the obs number column, so you need to omit the NOOBS option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print
  data=sales
  sumlabel='Total'
  grandtotal_label='Grand Total'
;
sum January February March;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want it in the salesperson column, use PROC REPORT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sales;
column salesperson january february march;
define salesperson / display;
define january / sum;
define february / sum;
define march / sum;
rbreak after / summarize;
compute after;
  salesperson = "Grand Total";
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 11 Jan 2022 08:06:58 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-01-11T08:06:58Z</dc:date>
    <item>
      <title>proc pint option grand_total</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789409#M252604</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sales;
input salesperson $ January February March ;
datalines;
Smith           1000        650        800
Johnson            0        900        900
Reed            1200        700        850
Davis           1050        900       1000
Thompson         750        850       1000
Peterson         900        600        500
Jones            800        900       1200
Murphy           700        800        700
Garcia           400       1200       1150
;
run;

proc print data=sales noobs sumlabel='Total' grandtotal_label='Grand Total' ;
sum January February March  ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anandkvn_0-1641886806159.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67278i39E6C5DE55FF25D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Anandkvn_0-1641886806159.png" alt="Anandkvn_0-1641886806159.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to grand_total&amp;nbsp; using grand_totallabel option but its not give&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 07:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789409#M252604</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2022-01-11T07:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc pint option grand_total</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789411#M252606</link>
      <description>&lt;P&gt;The label is displayed in the obs number column, so you need to omit the NOOBS option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print
  data=sales
  sumlabel='Total'
  grandtotal_label='Grand Total'
;
sum January February March;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want it in the salesperson column, use PROC REPORT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sales;
column salesperson january february march;
define salesperson / display;
define january / sum;
define february / sum;
define march / sum;
rbreak after / summarize;
compute after;
  salesperson = "Grand Total";
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jan 2022 08:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789411#M252606</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-01-11T08:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc pint option grand_total</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789414#M252607</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class;                                    
   by sex;                                                                 
run;  
                                                             
proc format;                                                               
   value $genderf                                                          
      'F'='Female'                                                         
      'M'='Male';                                                          
run;                                              
                                                                           
proc print data=class noobs                                                
     sumlabel='#byval(sex) Total' grandtotal_label='Grand Total';   
   by sex;                                                                 
   var name age height weight;                                             
   sum height weight;                                                                                                                                 
   format sex $genderf.;                                                   
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jan 2022 08:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789414#M252607</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2022-01-11T08:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc pint option grand_total</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789417#M252610</link>
      <description>&lt;P&gt;When you use BY, PROC PRINT knows where to put that label. Without BY, it can only use the obs column.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 09:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789417#M252610</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-01-11T09:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: proc pint option grand_total</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789494#M252636</link>
      <description>&lt;P&gt;I generally use a different report procedure, either Tabulate or Report to have more control over things and avoid the sometimes esoteric interactions of the Proc Print options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sales;
   class salesperson;
   var January February March;
   table salesperson='' All='Grand Total'  ,
         (January February March)*sum=''*f=best8.
         /box = 'Sales Person'
   ;
run;&lt;/PRE&gt;
&lt;P&gt;Also it seems like as soon as I do the basic report I get asked something like "What is the mean for each Sales person?" which Proc Print won't do.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 16:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pint-option-grand-total/m-p/789494#M252636</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-11T16:07:23Z</dc:date>
    </item>
  </channel>
</rss>

