<?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: how to create summary Report using  proc tabulate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327952#M73204</link>
    <description>&lt;P&gt;Post test data in the form of a datastep. &amp;nbsp;Post code you have tried. &amp;nbsp;Post what "&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I’m having issues getting report to come out as desired" issues you are having. &amp;nbsp;Also explain why " I need to use proc tabulate for creating a summary report" - summaries can be done in any number of ways. &amp;nbsp;Me, I am personally not fond of the tabulate procedure, so I would do this in a datastep, get it looking exactly as I want, then proc report that data out.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 09:34:11 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-01-27T09:34:11Z</dc:date>
    <item>
      <title>how to create summary Report using  proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327947#M73202</link>
      <description>&lt;P&gt;Hi, I need to use proc tabulate for creating a summary report,&amp;nbsp;&lt;SPAN&gt;I’m having issues getting report to come out as desired, please do have check, bellow is the desired O/P. &amp;nbsp;Sample data is attaed as &amp;nbsp;datastep version, attached with this. Please do have a look.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The variables used in the output table is &amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;probability= Probability&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Nbr_of_Optys = No of deals for probability level&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tot_Budget &amp;nbsp;=sum( Total media values for Probability level)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tot_Forecast = Tot_ Budget * Probability /100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;The desired output&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Probability&lt;/TD&gt;&lt;TD&gt;Nbr_of_Optys&lt;/TD&gt;&lt;TD&gt;Tot_Budget&lt;/TD&gt;&lt;TD&gt;Tot_Forecast&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;$171,675,000&lt;/TD&gt;&lt;TD&gt;$171,675,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;$205,000,000&lt;/TD&gt;&lt;TD&gt;$184,500,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;$264,000,000&lt;/TD&gt;&lt;TD&gt;$184,800,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;$127,040,000&lt;/TD&gt;&lt;TD&gt;$63,520,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;$2,450,000&lt;/TD&gt;&lt;TD&gt;$735,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;319&lt;/TD&gt;&lt;TD&gt;$333,729,670&lt;/TD&gt;&lt;TD&gt;$33,372,967&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;361&lt;/TD&gt;&lt;TD&gt;1103894670&lt;/TD&gt;&lt;TD&gt;638602967&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 08:29:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327947#M73202</guid>
      <dc:creator>JithinJoe</dc:creator>
      <dc:date>2017-01-27T08:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to create summary Report using  proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327952#M73204</link>
      <description>&lt;P&gt;Post test data in the form of a datastep. &amp;nbsp;Post code you have tried. &amp;nbsp;Post what "&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I’m having issues getting report to come out as desired" issues you are having. &amp;nbsp;Also explain why " I need to use proc tabulate for creating a summary report" - summaries can be done in any number of ways. &amp;nbsp;Me, I am personally not fond of the tabulate procedure, so I would do this in a datastep, get it looking exactly as I want, then proc report that data out.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 09:34:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327952#M73204</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-27T09:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to create summary Report using  proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327962#M73207</link>
      <description>&lt;P&gt;I agree with every remark of&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;Your report is one dimmension (class=probabilty) while proc tabulate is well used with two or three dimensions;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did not get, within my code, the results (amounts) you expect.&lt;/P&gt;
&lt;P&gt;I have probably misunderstand your formulas, but you may use the code as&lt;/P&gt;
&lt;P&gt;skilton to addapt to your needs:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=OLYMPICS nway missing;  /* &lt;SPAN&gt;sum( Total media values for Probability level) */&lt;/SPAN&gt;
   class probability;
   var Total_Property_s__Budget;
   output out=ol_sum(drop=_type_) sum=tot_budget;
run;

data ol2rep;
 set ol_sum(rename=(_freq_=Nbr_Of_Optys));
     tot_forcast = tot_budget * probability /100;
run;
proc sort data=ol2rep; by descending probability; run;
proc print data=ol2rep; 
    var probability Nbr_Of_Optys Tot_Budget Tot_Forcast;
    sum Nbr_Of_Optys Tot_Budget Tot_Forcast;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jan 2017 09:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327962#M73207</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-27T09:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to create summary Report using  proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327994#M73219</link>
      <description>&lt;P&gt;Since Tot_Forecast depends on multiplying two numeric variables, you will need to do at least a little processing before PROC TABULATE. &amp;nbsp;PROC TABULATE permits just one analysis variable per cell of the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an (untested) program that should give you enough to work with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;forecast = probability / 100 * budget;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc tabulate data=want;&lt;/P&gt;
&lt;P&gt;class probability;&lt;/P&gt;
&lt;P&gt;var budget forecast;&lt;/P&gt;
&lt;P&gt;tables probability all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; budget=' ' * (n='Nbr_of_Optys' sum='Tot_Budget' * f=dollar12.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; forecast=' ' * sum='Tot_Forecast'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As always, you can tinker with the format once you have it coming out with the right numbers.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/327994#M73219</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-27T12:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to create summary Report using  proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/328041#M73222</link>
      <description>&lt;P&gt;Example data really only needs the variables of interest. If using a program to generate the datastep code suggest making a set using KEEP option for the variables needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A couple of concerns: First you do not have a variable Tot_ Budget&amp;nbsp;in the data. I would guess that you meant Total_Property_s__Budget_Currenc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second is since you provided variables related to currency type is there an implication that if there are different currencies that there needs to be some standardization to a common currency with the full data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 15:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-summary-Report-using-proc-tabulate/m-p/328041#M73222</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-27T15:33:59Z</dc:date>
    </item>
  </channel>
</rss>

