<?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: Putting &amp;quot;Total&amp;quot; in the output from proc print and a sum statement in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872790#M26276</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/442191"&gt;@AEBatUSB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Honestly I forgot where you should see that option!&lt;/P&gt;
&lt;P&gt;I cannot remember the last time I did that "marking a post as a solution".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keep in mind, The person who originated the post, would be the only one who can mark a post as a solution.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 12:52:28 GMT</pubDate>
    <dc:creator>AhmedAl_Attar</dc:creator>
    <dc:date>2023-04-28T12:52:28Z</dc:date>
    <item>
      <title>Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/176789#M12566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print label noobs data=surv1;&lt;/P&gt;&lt;P&gt; var responsec count1 pct1;&lt;/P&gt;&lt;P&gt; sum count1 pct1;&lt;/P&gt;&lt;P&gt; label responsec='Response'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count1='N'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pct1='Pct';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Response&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&amp;nbsp;&amp;nbsp; Pct&lt;/P&gt;&lt;TABLE class="table"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="data"&gt;1-Strongly disagree&lt;/TD&gt;&lt;TD class="r data"&gt;11&lt;/TD&gt;&lt;TD class="r data"&gt;16%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="data"&gt;2-Disagree&lt;/TD&gt;&lt;TD class="r data"&gt;8&lt;/TD&gt;&lt;TD class="r data"&gt;12%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="data"&gt;3-Neither agree nor disagree&lt;/TD&gt;&lt;TD class="r data"&gt;30&lt;/TD&gt;&lt;TD class="r data"&gt;44%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="data"&gt;4-Agree&lt;/TD&gt;&lt;TD class="r data"&gt;10&lt;/TD&gt;&lt;TD class="r data"&gt;15%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="data"&gt;5-Strongly agree&lt;/TD&gt;&lt;TD class="r data"&gt;9&lt;/TD&gt;&lt;TD class="r data"&gt;13%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="header" scope="col"&gt;&amp;nbsp; &lt;/TH&gt;&lt;TH class="r header" scope="col"&gt;68&lt;/TH&gt;&lt;TH class="r header" scope="col"&gt;100%&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to add the word "Total" in the last line under "Response"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 15:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/176789#M12566</guid>
      <dc:creator>Roberta324</dc:creator>
      <dc:date>2015-02-20T15:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/176790#M12567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Look in the PROC PRINT documentation. There is a SUMLABEL= option and a GRANDTOTAL_LABEL= option that can be used. It depends on whether you have BY group processing in the PROC PRINT step or not. Typically, SUMLABEL would be for subgroups and GRANDTOTAL_LABEL would be for the bottom of the report. And if you're not using BY group processing, then you might want to switch to PROC REPORT in order to put some text on the final summary line on the report.&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 17:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/176790#M12567</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-02-20T17:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/539666#M22470</link>
      <description>&lt;P&gt;Hello Cynthia!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So am I understanding correctly that using proc print, you aren't able to label any sum unless you use a by variable? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 15:39:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/539666#M22470</guid>
      <dc:creator>tanner_lund</dc:creator>
      <dc:date>2019-03-01T15:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/539785#M22471</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Yes, SUMLABEL is designed for BY groups. But do not despair. PROC REPORT can come to the rescue:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="label_total_procreport.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27615iF2A99C481756D0EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="label_total_procreport.png" alt="label_total_procreport.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ps forgot to snip title statement -- title statement for code was:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;title 'Detail Report';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 22:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/539785#M22471</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-03-01T22:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/540021#M22473</link>
      <description>&lt;P&gt;Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 13:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/540021#M22473</guid>
      <dc:creator>tanner_lund</dc:creator>
      <dc:date>2019-03-04T13:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872338#M26271</link>
      <description>&lt;P&gt;Is there a way to have "Total" print, when the first column is a number or date? The code below doesn't produce total in the summary line.&amp;nbsp; Nothing appears where I would expect the word Total to appear.&amp;nbsp; This same code works though when the first column is a character.&amp;nbsp; Also, I have other examples where the variable is only one or three characters and the word Total gets truncated to 'Tot' or 'T' in those cases.&amp;nbsp; I've tried to format the variable to be six characters hoping it would trick SAS into thinking that the field should be that width, but as you know, there's no &lt;STRONG&gt;&lt;EM&gt;tricking&lt;/EM&gt;&lt;/STRONG&gt; SAS.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data=sasuser.plan_date out=sasuser.plan_daily_all;&lt;BR /&gt;column ('ExtendPay Plans by Date' start_date accts transactions Orig_loan Orig_Fees avg_loan avg_fee loan_term) ;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;define start_date /group 'Enrollment Date' center;&lt;/FONT&gt;&lt;BR /&gt;define accts /n 'Number of Accounts' format=comma15. center;&lt;BR /&gt;define transactions /sum ' Number of Transactions' format=comma15. center;&lt;BR /&gt;define orig_loan/ sum 'Total Plan Balance' format=dollar15.0;&lt;BR /&gt;define orig_fees / sum 'Total Monthly Plan Fees' format=dollar15.0;&lt;BR /&gt;define avg_loan /computed'Avg. Plan Amount' format=dollar15.0;&lt;BR /&gt;define avg_fee / computed 'Avg. Plan Fees' format=dollar15.0;&lt;BR /&gt;define loan_term /mean 'Avg. # of Payments per Plan' center;&lt;/P&gt;&lt;P&gt;where start_date &amp;gt;'31MAR2023'd;&lt;/P&gt;&lt;P&gt;compute avg_loan;&lt;BR /&gt;avg_loan=orig_loan.sum/plans.n;&lt;BR /&gt;endcomp;&lt;BR /&gt;compute avg_fee;&lt;BR /&gt;avg_fee=orig_fees.sum/plans.n;&lt;BR /&gt;endcomp;&lt;BR /&gt;rbreak after / summarize style(summary)=[font=("Calibri")fontweight=bold];&lt;BR /&gt;compute after;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;START_DATE = 'Total';&lt;/FONT&gt;&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 18:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872338#M26271</guid>
      <dc:creator>AEBatUSB</dc:creator>
      <dc:date>2023-04-26T18:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872395#M26272</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Instead of tacking a PROC REPORT question onto a 2015 posting about PROC PRINT, it would be better to start a new post, and if you need to, refer to this older post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You should be seeing a note in your log with your attempt to assign a text string to a numeric variable. I used a subset of SASHELP.CLASS since I did not have your SASUSER data. Here's the default behavior:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1682543161302.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83269iD70A9B562CA8080C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1682543161302.png" alt="Cynthia_sas_0-1682543161302.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; However, there are 2 possible methods to do what you want with PROC REPORT, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1682544045979.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83270i9685D6A35F071EE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1682544045979.png" alt="Cynthia_sas_1-1682544045979.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And, yes, summarizing HEIGHT and WEIGHT is sort of silly, but there just needed to be a summary line on the report.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 21:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872395#M26272</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-04-26T21:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872575#M26273</link>
      <description>&lt;P&gt;Thank you, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;.&amp;nbsp; The first option worked.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 13:39:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872575#M26273</guid>
      <dc:creator>AEBatUSB</dc:creator>
      <dc:date>2023-04-27T13:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872584#M26274</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/442191"&gt;@AEBatUSB&lt;/a&gt;&lt;BR /&gt;You'll need to mark/accept the post that worked as a solution</description>
      <pubDate>Thu, 27 Apr 2023 14:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872584#M26274</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-27T14:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872696#M26275</link>
      <description>HI AhmedAl_Attar,&lt;BR /&gt;I don’t see a place for me to do that.&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Apr 2023 21:33:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872696#M26275</guid>
      <dc:creator>AEBatUSB</dc:creator>
      <dc:date>2023-04-27T21:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872790#M26276</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/442191"&gt;@AEBatUSB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Honestly I forgot where you should see that option!&lt;/P&gt;
&lt;P&gt;I cannot remember the last time I did that "marking a post as a solution".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keep in mind, The person who originated the post, would be the only one who can mark a post as a solution.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 12:52:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872790#M26276</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-28T12:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872793#M26277</link>
      <description>I found it!&lt;BR /&gt;Go here &lt;A href="https://communities.sas.com/t5/help/faqpage/title/solution_howdoi" target="_blank"&gt;https://communities.sas.com/t5/help/faqpage/title/solution_howdoi&lt;/A&gt;&lt;BR /&gt;and look for "How do I mark a message as a solution?" within/under "Accepted Solutions"</description>
      <pubDate>Fri, 28 Apr 2023 13:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872793#M26277</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-28T13:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Putting "Total" in the output from proc print and a sum statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872934#M26278</link>
      <description>&lt;P&gt;It's not an option on my post, probably since I replied to an old post instead of creating a new one.&amp;nbsp; No worries, it says in my notes that it worked. Both options worked.&amp;nbsp; I ended up having to change it to the second solution because in SAS EG, when I selected Excel as the output for some reason it dropped the word total on the output - I could see it on the HTML output but not on the export.&amp;nbsp; So, I tried the second option Cynthia provided and now the total appears on my output.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 21:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Putting-quot-Total-quot-in-the-output-from-proc-print-and-a-sum/m-p/872934#M26278</guid>
      <dc:creator>AEBatUSB</dc:creator>
      <dc:date>2023-04-28T21:19:40Z</dc:date>
    </item>
  </channel>
</rss>

