<?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 report help. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-help/m-p/865969#M341983</link>
    <description>&lt;P&gt;Cannot test code without data.&lt;/P&gt;
&lt;P&gt;Cannot test code with macro variables without knowing what the values of the macro variables are.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The very first example for Proc Report in the online help shows how to add a summary line at the end of a report.&lt;/P&gt;
&lt;P&gt;However anything called a "rate" is very likely not going to get a valid summary that way as the default summary is a SUM and Across variables complicate such. Rates typically need a numerator and denominator plus any other formula bits and to do a combined rate have to combine the individual numerators. Typical example: drive 1,000 miles and get a mileage rate of 1mpg, drive 1 mile and get 100mpg (lots of costing downhill perhaps) the average rate is not going to be (1+100)/2=50.5mpg.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 15:33:57 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-03-23T15:33:57Z</dc:date>
    <item>
      <title>Proc report help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-help/m-p/865964#M341981</link>
      <description>&lt;P&gt;I am using macros because I am using a lot of years and different variables. &amp;amp;yr.=year &amp;amp;var.=Program_type. i attached what it produces. I also want another row below it with totals for cohort column and retention rates for entire program should look like this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;total:&lt;/TD&gt;&lt;TD&gt;596&lt;/TD&gt;&lt;TD&gt;68.27&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;78.74&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data = cretention&amp;amp;yr.&amp;amp;var. split='\';&lt;BR /&gt;column Instruction_Method &amp;amp;var.,(count Retention_rate);&lt;BR /&gt;define Instruction_method / group "Fall Instruction Method" width=8;&lt;BR /&gt;define &amp;amp;var. / across "&amp;amp;var.";&lt;BR /&gt;define Count / 'Cohort';&lt;BR /&gt;define Retention_rate/ 'Retention Rate';&lt;BR /&gt;title "Fall &amp;amp;yr. to Spring Retention Rate by Fall Instruction Method and &amp;amp;var.";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-help/m-p/865964#M341981</guid>
      <dc:creator>jteague</dc:creator>
      <dc:date>2023-03-23T15:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report help.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-help/m-p/865969#M341983</link>
      <description>&lt;P&gt;Cannot test code without data.&lt;/P&gt;
&lt;P&gt;Cannot test code with macro variables without knowing what the values of the macro variables are.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The very first example for Proc Report in the online help shows how to add a summary line at the end of a report.&lt;/P&gt;
&lt;P&gt;However anything called a "rate" is very likely not going to get a valid summary that way as the default summary is a SUM and Across variables complicate such. Rates typically need a numerator and denominator plus any other formula bits and to do a combined rate have to combine the individual numerators. Typical example: drive 1,000 miles and get a mileage rate of 1mpg, drive 1 mile and get 100mpg (lots of costing downhill perhaps) the average rate is not going to be (1+100)/2=50.5mpg.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-help/m-p/865969#M341983</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-23T15:33:57Z</dc:date>
    </item>
  </channel>
</rss>

