<?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 PRINT grandtotal_label in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655585#M78858</link>
    <description>Chris, what makes you think that it's only effective on a BY statement. It definitely seems to be valid only with a BY statement but I don't see anything in the documentation that actually explicitly states this is a limit though I'm likely missing it.</description>
    <pubDate>Tue, 09 Jun 2020 16:31:45 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-06-09T16:31:45Z</dc:date>
    <item>
      <title>PROC PRINT grandtotal_label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655578#M78853</link>
      <description>&lt;P&gt;Hi SAS folks-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Small issue... was doing a quick proc print, used sum to get a grand total, then couldn't figure out how to label it.&amp;nbsp; Anyone know why grandtotal_label is not working here?&amp;nbsp; (Yes, I could do it in another proc, but got interested.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wendy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;proc print data=sashelp.shoes label noobs grandtotal_label='Total Sales';&lt;BR /&gt;id region ;&lt;BR /&gt;sum sales ;&lt;BR /&gt;where product='Boot' and region like 'A%' ;&lt;BR /&gt;run ;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 16:15:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655578#M78853</guid>
      <dc:creator>WendyT</dc:creator>
      <dc:date>2020-06-09T16:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT grandtotal_label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655579#M78854</link>
      <description>I'm running SAS 9.4M5 on Windows with a remote login, if that makes any difference.</description>
      <pubDate>Tue, 09 Jun 2020 16:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655579#M78854</guid>
      <dc:creator>WendyT</dc:creator>
      <dc:date>2020-06-09T16:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT grandtotal_label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655581#M78855</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16896"&gt;@WendyT&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;the grand total label is actually displayed in the ‘obs’ column.&lt;/P&gt;
&lt;P&gt;To see it, you need to remove the NOOBS option as well as the ID statement.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.shoes label /*noobs*/ grandtotal_label='Total Sales';
*id region ;
sum sales ;
where product='Boot' and region like 'A%' ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jun 2020 16:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655581#M78855</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-06-09T16:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT grandtotal_label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655583#M78856</link>
      <description>&lt;P&gt;I think SUMLABEL and GRANDTOTAL_LABEL kick in only when there is a BY group.&amp;nbsp; That's how those options are documented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.shoes 
  label noobs sumlabel='Region Sales' 
  grandtotal_label="TOTAL Sales";
by region ;
sum sales ;
where product='Boot' and region like 'A%' ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHemedinger_0-1591719896815.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/41594iC88420CA0AB65669/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHemedinger_0-1591719896815.png" alt="ChrisHemedinger_0-1591719896815.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 16:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655583#M78856</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-06-09T16:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT grandtotal_label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655584#M78857</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&amp;nbsp;is correct.&amp;nbsp; And...so am I, sort of, with the BY group note.&amp;nbsp; So...take your pick of which approach suits you!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 16:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655584#M78857</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-06-09T16:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT grandtotal_label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655585#M78858</link>
      <description>Chris, what makes you think that it's only effective on a BY statement. It definitely seems to be valid only with a BY statement but I don't see anything in the documentation that actually explicitly states this is a limit though I'm likely missing it.</description>
      <pubDate>Tue, 09 Jun 2020 16:31:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655585#M78858</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-09T16:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT grandtotal_label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655588#M78859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;- as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&amp;nbsp;points out, you can use it without BY when the OBS column is displayed.&amp;nbsp; With BY and the SUMLABEL, there's a "Sum" spot allocated so I guess it just renders there.&amp;nbsp; This is probably a function of the ODS template for this in PROC PRINT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as how I read the doc...well, you're right.&amp;nbsp; It doesn't say a BY is needed.&amp;nbsp; I was just thinking like a PROC.&amp;nbsp; "SUMLABEL" is doc'd as needing a BY to display group totals, and a "grand total" is a total of totals...so I just assumed a BY was needed for that too.&amp;nbsp; But I guess not, though it seems to help in some cases &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 16:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINT-grandtotal-label/m-p/655588#M78859</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-06-09T16:39:28Z</dc:date>
    </item>
  </channel>
</rss>

