<?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: Pre-calculated sums, display in proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232902#M268130</link>
    <description>Create a variable that maps to your grouping and use that.</description>
    <pubDate>Tue, 03 Nov 2015 15:52:55 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-11-03T15:52:55Z</dc:date>
    <item>
      <title>Pre-calculated sums, display in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232886#M268128</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi SAS Experts,&lt;BR /&gt;I have pre-calculated sums in my source data table:&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;Group--Substance--Positives&lt;BR /&gt;A______Ivy________34&lt;BR /&gt;A______Box________3&lt;BR /&gt;Asum______________17&lt;BR /&gt;B______Ivy________11&lt;BR /&gt;B______Box________25&lt;BR /&gt;Bsum______________40&lt;BR /&gt;&lt;BR /&gt;The custom sums are not logical "sums" top-down&lt;BR /&gt;but present a "different" way of summing up.&lt;BR /&gt;So I cant use a GROUP and BREAK in my PROC REPORT&lt;BR /&gt;but must display those custom sums as if they&lt;BR /&gt;indeed where just caused by GROUP and BREAK.&lt;BR /&gt;&lt;BR /&gt;There is the problem of order, how does SAS now&lt;BR /&gt;that Asum should come after all the A's and second&lt;BR /&gt;how to display my pre-calculated number as a "sum" i.e. GROUP / BREAK.&lt;BR /&gt;&lt;BR /&gt;Can someone point me in the right direction?&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;, this is a requirement by the end-user. &lt;BR /&gt;I have not chosen to create those weird totals/sums&lt;BR /&gt;that do not really represent totals.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 14:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232886#M268128</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2015-11-03T14:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-calculated sums, display in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232893#M268129</link>
      <description>&lt;P&gt;Just do it in the datastep. &amp;nbsp;If you want subgroups:&lt;/P&gt;
&lt;P&gt;data inter;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if group="Asum" then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; line="----------------"; output;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; line=strip(group)||" - "||strip(put(positives,best.));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; line="--------....&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So set your dataset up eaxctly as you want the output to look, don't try to do illogical things through logical processes. &amp;nbsp;Alternatively, add another variable to group things?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 15:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232893#M268129</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-03T15:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-calculated sums, display in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232902#M268130</link>
      <description>Create a variable that maps to your grouping and use that.</description>
      <pubDate>Tue, 03 Nov 2015 15:52:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232902#M268130</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-03T15:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pre-calculated sums, display in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232923#M268131</link>
      <description>&lt;P&gt;If your group and substance values are separate variables you should be okay just calling them grouping variables though you may needt to specify that missing values of substance are okay. And if&amp;nbsp;the values are are precalculated then look at using a listing style report, no summary statistics (sum&amp;nbsp;)&amp;nbsp;needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 16:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pre-calculated-sums-display-in-proc-report/m-p/232923#M268131</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-03T16:53:11Z</dc:date>
    </item>
  </channel>
</rss>

