<?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: Report Basics in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103803#M21670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still don't understand what you want....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2012 22:23:40 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2012-12-18T22:23:40Z</dc:date>
    <item>
      <title>Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103798#M21665</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;I have variables like shown&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code&amp;nbsp;&amp;nbsp; Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Discharges&amp;nbsp;&amp;nbsp;&amp;nbsp; numer&amp;nbsp;&amp;nbsp; denom&amp;nbsp;&amp;nbsp;&amp;nbsp; readmit rate&lt;/P&gt;&lt;P&gt;aaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; headache&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&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; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.33&lt;/P&gt;&lt;P&gt;bbb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vomits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 777&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; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&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; 7.7&lt;/P&gt;&lt;P&gt;ccc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bodypain&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 350&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; 22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 400&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19.25&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define code/order=freq descending&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using the above define stmnt I am getting in the descending order of discharges as shown below???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bbb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vomits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 777&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; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&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; 7.7&lt;/P&gt;&lt;P&gt;aaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; headache&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&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; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.33&lt;/P&gt;&lt;P&gt;ccc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bodypain&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 350&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; 22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 400&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19.25&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HOW CAN I GET???&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;aaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; headache&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&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; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.33&lt;/P&gt;&lt;P&gt;ccc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bodypain&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 350&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; 22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 400&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19.25&lt;/P&gt;&lt;P&gt;bbb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vomits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 777&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; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&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; 7.7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 21:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103798#M21665</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-18T21:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103799#M21666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you sorting by?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have preferred sort the best method in SAS is to put that variable as numbers in the sort order and then apply a format to the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A totally different example but same procedure here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2012/12/17/sorting-out-your-panelled-graphs-part-1/?utm_source=feedburner&amp;amp;utm_medium=email&amp;amp;utm_campaign=Feed%3A+tzio+%28Graphically+Speaking%29" title="http://blogs.sas.com/content/graphicallyspeaking/2012/12/17/sorting-out-your-panelled-graphs-part-1/?utm_source=feedburner&amp;amp;utm_medium=email&amp;amp;utm_campaign=Feed%3A+tzio+%28Graphically+Speaking%29"&gt; Sorting out your panelled graphs (part 1) - Graphically Speaking&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 21:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103799#M21666</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-18T21:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103800#M21667</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;Thanks for the reply. I calculate the readmit rate in the proc report itself.So I am not doing any sort for the dataset&lt;/P&gt;&lt;P&gt;Also I ncannot write a format in this case because there are hundreds of records. I jus showed three of them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103800#M21667</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-18T22:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103801#M21668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming your question is about the order of the data ie sorting, if not can you clarify? &lt;/P&gt;&lt;P&gt;I see how you want it, but couldn't tell you why or what rule you're trying to implement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103801#M21668</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-18T22:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103802#M21669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;The readmit rate variable you see is got from the proc report step.&lt;/P&gt;&lt;P&gt;I used a compute block to do it:&lt;/P&gt;&lt;P&gt;numer.sum/denom.sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also readmit rate is not a group ,order or across variable so it is not letting me to use descending option in the proc report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:19:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103802#M21669</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-18T22:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103803#M21670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still don't understand what you want....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103803#M21670</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-18T22:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103804#M21671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okie.The above table is not the dataset but the output from a proc report...in which i am using computed block to calculate the readmit rates with the above mentioned formulae.&lt;/P&gt;&lt;P&gt;So the report i got should be changed into the Decreasing order of Percentages(i mean readmit rate)...&lt;/P&gt;&lt;P&gt;it is in the irregular order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps you&amp;nbsp; with some idea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103804#M21671</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-18T22:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103805#M21672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, you're reporting data using proc report. In the procedure you calculate a field, readmit rate, and you would like the report sorted by the calculated field in descending order?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103805#M21672</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-18T22:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103806#M21673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103806#M21673</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-18T22:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103807#M21674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get the same error in Proc report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally, I prefer to do the calculations outside of report and use it as a display tool instead. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103807#M21674</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-18T22:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103808#M21675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;You cannot compute a variable and also order by it in the same PROC REPORT step. Your best bet is to compute the readmit rate outside of PROC REPORT and then make an ordering variable or other wise order outside of report. Look at my example 3 in the "Creating Complex Reports" paper (&lt;A href="http://www2.sas.com/proceedings/forum2008/173-2008.pdf" title="http://www2.sas.com/proceedings/forum2008/173-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/173-2008.pdf&lt;/A&gt; page 11 -- the code can be found &lt;A href="http://support.sas.com/rnd/papers/" title="http://support.sas.com/rnd/papers/"&gt;Technical Papers and Presentations made by SAS staff&lt;/A&gt; in the section for 2008).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 23:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103808#M21675</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-12-18T23:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103809#M21676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could not get the exact code after scanning thru the 2008 presentations.&lt;/P&gt;&lt;P&gt;basically I have around 15k patients who are grouped based on CODE variable. Under each code there are several thousands discharged.we have again two variables NUMER and DENOM which have 1or 0&amp;nbsp; as values . How do we do the&lt;/P&gt;&lt;P&gt;numer.sum/denom.sum in the data step under each code???&lt;/P&gt;&lt;P&gt;the above posts give some clarity. Let me know if you require any further info&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 02:35:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103809#M21676</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-19T02:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103810#M21677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Did you download the zip file??? The data that is used for the #3 example is SASHELP.SHOES. Look at my example, I had to make 2 passes through the data -- the first pass summarized the data and created a variable that could be used for ordering. Granted, in my program, I was NOT calculating a new variable, but the concept is still the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; But I have a question about your posted example, how did you derive your readmit rate??? For example, you show this:&lt;/P&gt;&lt;P&gt;Code&amp;nbsp;&amp;nbsp; Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Discharges&amp;nbsp;&amp;nbsp;&amp;nbsp; numer&amp;nbsp;&amp;nbsp; denom&amp;nbsp;&amp;nbsp;&amp;nbsp; readmit rate&lt;/P&gt;&lt;P&gt;aaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; headache&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&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; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;33.33&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and say that your formula is &lt;STRONG&gt;numer.sum/denom.sum&lt;/STRONG&gt;, but when I divide 10/150 for just this row , my calculator gives me: 0.066666667 and not .3333, so can you elaborate? It doesn't look like the rate of the grand total, either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 20:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103810#M21677</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-12-19T20:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103811#M21678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks a lot for your persual.Yes you are right .i mite have done that in a hurry&lt;/P&gt;&lt;P&gt;The mistake i commited was that i multiplied the product with the number of discharges.I dont know why I did but thats wrong.i aplologise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 20:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103811#M21678</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-19T20:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103812#M21679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me also tell you the progress i made so far........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like you taught me in the earlier posts and said we cannot order a computed variable.........I created a OUT=dataset in a dummy PROC REPORT which have the rate calculated as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;rate=(readmit_numer.sum/readmit_denom.sum)*100;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;Now I have the percentages in the dataset.......And so I can order then by&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;define rate/order=freq descending in the NEXT PROC REPORT STEP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;IS THAT RIGHT??????&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 20:47:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103812#M21679</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-19T20:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103813#M21680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it and let us know &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 20:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103813#M21680</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-19T20:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103814#M21681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have percentages calculated &lt;STRONG&gt;in the dataset&lt;/STRONG&gt; and some of the values are like&lt;/P&gt;&lt;P&gt;75&lt;/P&gt;&lt;P&gt;62.924567&lt;/P&gt;&lt;P&gt;32&lt;/P&gt;&lt;P&gt;35.987543&lt;/P&gt;&lt;P&gt;After the above datastep is a SORT step to sort it from highest percentage to lowest percentage&lt;STRONG&gt;(because I was requested like that)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later I am going for the REPORT PRocedure as shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the &lt;STRONG&gt;Proc report &lt;/STRONG&gt;Define statement&amp;nbsp; how can I make them look better&lt;/P&gt;&lt;P&gt;75.00%&lt;/P&gt;&lt;P&gt;62.92%&lt;/P&gt;&lt;P&gt;32.00%&lt;/P&gt;&lt;P&gt;35.99%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using define rate/display format=10.2&amp;nbsp; and I am not getting it right!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 23:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103814#M21681</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-19T23:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103815#M21682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;format=best10.2&amp;nbsp;&amp;nbsp; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 01:53:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103815#M21682</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-20T01:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103816#M21683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wel. Thanks for the reply. Let me tell you my current situation.&lt;/P&gt;&lt;P&gt;I did the rate calculation in the datastep. and i have values like shown &lt;STRONG&gt;IN THE DATASET&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;75&lt;/P&gt;&lt;P&gt;62.924567&lt;/P&gt;&lt;P&gt;32&lt;/P&gt;&lt;P&gt;35.987543&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to take this dataset and do a REPORT.&lt;/P&gt;&lt;P&gt;In the REPORT I want&lt;/P&gt;&lt;P&gt;75.00%&lt;/P&gt;&lt;P&gt;62.92%&lt;/P&gt;&lt;P&gt;32.00%&lt;/P&gt;&lt;P&gt;35.99%&lt;/P&gt;&lt;P&gt;BUT I SHOULD ALSO GET the &lt;STRONG&gt;51.47% When i Summarize.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is that possible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 02:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103816#M21683</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-12-20T02:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Report Basics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103817#M21684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK...here's something to study on. I don't actually think you need ORDER=FREQ DESCENDING. Take a look at this example -- it uses SASHELP.CLASS and divides height.sum by weight.sum -- sort of a silly ratio, but shows division in the creation of the new "helper" variables RATEORD and RRATE. I did not hide RATEORD in the #3 report, but after you understand what's happening, you can use NOPRINT:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.class nowd out=rateout;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '1) Make 2 "extra" variables';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column age height weight rrate rateord;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define height /sum;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define weight/ sum;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define rrate / computed;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define rateord / computed;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute rrate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rrate = height.sum / weight.sum;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute rateord;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rateord = height.sum/weight.sum;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=rateout;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title '2) what is in RATEOUT dataset';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc sort data=rateout;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; by descending rateord age;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\rateout.html' style=sasweb;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=rateout nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '3) Use RATEORD for ordering and use RRATE with % format';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column rateord age height weight rrate;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define rateord / order order=data /* noprint */;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define height / sum;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define weight/sum;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define rrate / f=percent9.2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; rbreak after / summarize;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute rrate;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _break_ = '_RBREAK_' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** calculate new overall rate for summary line;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** by dividing, or else rrate will be just added up;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rrate.sum = height.sum / weight.sum;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Note that I did not multiply by 100 in my formula - -there's no point because when I use the PERCENT format on RRATE, the decimal point will be shifted. If you don't want to display the % sign, then go ahead and multiply by 100. For situations like this, I prefer to use PROC SORT to get the sort order I want and then just use ORDER=DATA on the DEFINE statement. You did not say whether you wanted an "overall" ratio, so, just in case, you will want that, I put an RBREAK and a COMPUTE in the #3. If you don't want that, then just get rid of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10787i0BEC9A89501F1BAA/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="creating_rateord.png" title="creating_rateord.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 03:01:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-Basics/m-p/103817#M21684</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-12-20T03:01:26Z</dc:date>
    </item>
  </channel>
</rss>

