<?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: Grand Total Columns with Proc Report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/501284#M21852</link>
    <description>&lt;P&gt;Try changing your definition of CATEGORY to use GROUP rather than DISPLAY:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;define category / group 'Category';&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 03 Oct 2018 21:10:18 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-10-03T21:10:18Z</dc:date>
    <item>
      <title>Grand Total Columns with Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/501274#M21851</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using proc report for an ods output but I need to have the columns totaled at the bottom.&amp;nbsp; I have been researching and have gotten the line at the end of my data that says Grand Total.. but non of my columns have totals in them.&amp;nbsp; I have tried using compute but have not been successful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is what I have so far:&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;STRONG&gt;&lt;SPAN&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;report&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;nofs&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;=bank_rpt&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;list&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;title&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Retail Bank"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;column&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;category&amp;nbsp;&amp;nbsp;&amp;nbsp; calls percent_calls transfers&amp;nbsp;&amp;nbsp;&amp;nbsp; percent_xfers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xfer_rate ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;define&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;category /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Category'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;define&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;calls /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;analysis&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'IVR Calls'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;define&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;percent_calls /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;analysis&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'% of IVR Calls'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;define&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;transfers /&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;analysis&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Xfer to IVR or Agent'&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;define&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;percent_xfers /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;analysis&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'% of Transfers'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;define&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;xfer_rate /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;analysis&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;'Transfer Rate'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;rbreak&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;after&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;/&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;summarize&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;style&lt;/SPAN&gt;&lt;SPAN&gt;(summary) = {font_weight=bold font_size=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;compute&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;after&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Grand Total"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;endcomp&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;so I don't know what to add to get my columns to sum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;data sample:&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;category calls transfers percent_calls percent_xfers xfer_rate&lt;BR /&gt;Activity 1,821,243 455,242 56.50% 43.79% 25.00%&lt;BR /&gt;Unauthenticated 637,303 249,487 19.77% 24.00% 39.15%&lt;BR /&gt;Authentication 421,053 187,932 13.06% 18.08% 44.63%&lt;BR /&gt;Main Menu 175,487 85,933 5.44% 8.27% 48.97%&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;TIA&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;Elliott&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 20:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/501274#M21851</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2018-10-03T20:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Grand Total Columns with Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/501284#M21852</link>
      <description>&lt;P&gt;Try changing your definition of CATEGORY to use GROUP rather than DISPLAY:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;define category / group 'Category';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Oct 2018 21:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/501284#M21852</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-10-03T21:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Grand Total Columns with Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/501495#M21853</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; Is that the actual program you're using to read the data? SAS will not read commas and percents using a simple INPUT statement. well, you don't actually show a valid INPUT statement in your program.&lt;BR /&gt;&lt;BR /&gt;So I am not sure what your data looks like but that program won't create the data.&lt;BR /&gt;&lt;BR /&gt;However, you have another issue and it is this...for all your numeric variables, you have:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;DEFINE num_var / analysis sum&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;display &lt;FONT color="#000000"&gt;...;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;so the last usage you have is &lt;FONT color="#FF0000"&gt;DISPLAY&lt;/FONT&gt; for your numeric variables and that is essentially turning off the analysis sum usage that you need for the numeric variables to be summed.&lt;BR /&gt;&lt;BR /&gt;I think if you just take off DISPLAY from all of your numeric variables you'll be OK (assuming that the commas and % were the cosmetics that you typed --I just wonder because I don't see any formats in your DEFINE Statements and the use of commas and percents could indicate that those variables are character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked for me:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="display_not_summarize.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23778i67C06C948B57AFE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="display_not_summarize.png" alt="display_not_summarize.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 14:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/501495#M21853</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-10-04T14:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Grand Total Columns with Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/834847#M25942</link>
      <description>Hi Cynthia, &lt;BR /&gt;what if you only want the sum of two of the items in the category column?</description>
      <pubDate>Fri, 23 Sep 2022 14:36:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/834847#M25942</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2022-09-23T14:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Grand Total Columns with Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/834887#M25946</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I'm not exactly sure what you're asking. If you want to turn off the summary for 2 of the columns, then you need to change the USAGE to DISPLAY, 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_0-1663946126172.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75531i809F1BC3353EEC55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1663946126172.png" alt="Cynthia_sas_0-1663946126172.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you only want to add up 2 or 3 of the categories, then you'd need to do some pre-processing or pre-summarizing, probably make some helper variables.&amp;nbsp; I would make a copy of the dataset like this and turn one category's helper variables into missing:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1663952027837.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75536i10353C88299BF9CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1663952027837.png" alt="Cynthia_sas_1-1663952027837.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So then, when I do the PROC REPORT, I can move the helper variables under the correct column in the COMPUTE AFTER block:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1663952386751.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75537iE9D7D2EC1AFC5101/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1663952386751.png" alt="Cynthia_sas_2-1663952386751.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The above screen shot shows the progression from creating the helper variables and using them in 3a) to moving the helper variable values on the summary line over to the report columns (3b) to the final report with the helper variables hidden (3c).&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's the code for 3c:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_3-1663952487155.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75538i4C0911EA7335C8E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_3-1663952487155.png" alt="Cynthia_sas_3-1663952487155.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 17:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/834887#M25946</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-09-23T17:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Grand Total Columns with Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/834896#M25947</link>
      <description>Thanks so much Cynthia!!</description>
      <pubDate>Fri, 23 Sep 2022 17:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Grand-Total-Columns-with-Proc-Report/m-p/834896#M25947</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2022-09-23T17:50:45Z</dc:date>
    </item>
  </channel>
</rss>

