<?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: I need PROC REPORT to summarize to a weighted average! Arrrgh! in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123882#M34056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I never used WEIGHT option to calculate the weight mean. here is an idea, can you define a computed var to accumulate SF_TOT_V based on the weight variable? the SF_TOT_V and SFTALL defined with noprint option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2012 03:22:43 GMT</pubDate>
    <dc:creator>AUTigers</dc:creator>
    <dc:date>2012-09-18T03:22:43Z</dc:date>
    <item>
      <title>I need PROC REPORT to summarize to a weighted average! Arrrgh!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123880#M34054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a lot of success with PROC REPORT, but I have one major hangup. First off, my data is single family and multi family housing completions by county. So I have a column of SF completions in 2012, then a computed column with the V%, or percent change from 2011 to 2012. So far so good. But the summary line needs to be the sum of this year's housing starts (Again, easy...) and the V% of those counties from last year to this year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried using: define SF_TOT_V / analysis mean weight=sftall 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;where sftall is the sum of housing starts for 2011 &amp;amp; 2012. I've tried using EVERYTHING as this weight. I've gotten nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone who has ever had to do this before? My code is attached here:&lt;/P&gt;&lt;P&gt;data Contract;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;retain salescode cnty_stat TotalV sf2012 SF_V sf_tot SF_TOT_V sfcompl2012 SF_COMP_V mf2012 MF_V mf_tot MF_TOT_V mfcompl2012 MF_COMP_V &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TotDir TotDirV TotUnits TotUnitsV TotComp ;&lt;/P&gt;&lt;P&gt;set alm1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sf_tot = round(sft2012,1);&lt;/P&gt;&lt;P&gt;mf_tot = round(mft2012,1);&lt;/P&gt;&lt;P&gt;SF_V = round(divide((sf2012-sf2011),sf2011) *100,1);&lt;/P&gt;&lt;P&gt;sftall=(sft2011+sft2012);&lt;/P&gt;&lt;P&gt;SF_TOT_V = round(divide((sf_tot-sft2011),sft2011)*100,1);&lt;/P&gt;&lt;P&gt;SF_COMP_V = round(divide((sfcompl2012-sfcompl2011),sfcompl2011)*100,1);&lt;/P&gt;&lt;P&gt;MF_V = round(divide((mf2012-mf2011),mf2011)*100,1);&lt;/P&gt;&lt;P&gt;MF_TOT_V = round(divide((mf_tot-mft2011),mft2011)*100,1);&lt;/P&gt;&lt;P&gt;MF_COMP_V = round(divide((mfcompl2012-mfcompl2011),mfcompl2011)*100,1);&lt;/P&gt;&lt;P&gt;TotDir = sf2012 + mf2012;&lt;/P&gt;&lt;P&gt;TotDir2011 = sf2011 + mf2011;&lt;/P&gt;&lt;P&gt;TotDirV = round(divide((TotDir - TotDir2011),TotDir2011)*100,1);&lt;/P&gt;&lt;P&gt;TotUnits = sft2012 + mft2012;&lt;/P&gt;&lt;P&gt;TotUnits2011 = sft2011 + mft2011;&lt;/P&gt;&lt;P&gt;TotUnitsV = round(divide((TotUnits - TotUnits2011),TotUnits2011)*100,1);&lt;/P&gt;&lt;P&gt;TotComp = sfcompl2012 + mfcompl2012;&lt;/P&gt;&lt;P&gt;TotComp2011 = sfcompl2011 + mfcompl2011;&lt;/P&gt;&lt;P&gt;TotComp2012 = sfcompl2012 + mfcompl2012;&lt;/P&gt;&lt;P&gt;TotalV = round(divide((TotComp - TotComp2011),TotComp2011)*100,1);&lt;/P&gt;&lt;P&gt;mftall = mft2012+mft2011;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep salescode cnty_stat TotalV sf2012 SF_V sft2012 SF_TOT_V sfcompl2012 SF_COMP_V mf2012 MF_V mft2012 MF_TOT_V mfcompl2012 MF_COMP_V &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TotDir TotDirV TotUnits TotUnitsV TotComp srsregn cregname mftall sftall;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;/************************************************************************************/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/************************************************************************************/&lt;/P&gt;&lt;P&gt;ods rtf file='C:\Documents and Settings\aaronm\Desktop\DP186\TESTING.doc';&lt;/P&gt;&lt;P&gt;proc report data=Contract nowindows;&lt;/P&gt;&lt;P&gt;title1 'Contract Performance Summary - Total Share Products';&lt;/P&gt;&lt;P&gt;title2 'Operation: &amp;amp;Name Region: &amp;amp;Region';&lt;/P&gt;&lt;P&gt;title3 'YTD &amp;amp;Month, &amp;amp;Year';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;columns salescode cnty_stat&amp;nbsp; sf2012 SF_V sft2012 SF_TOT_V sfcompl2012 SF_COMP_V mf2012 MF_V mft2012 MF_TOT_V mfcompl2012 MF_COMP_V &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TotDir TotDirV TotUnits TotUnitsV TotComp TotalV sftall mftall;&lt;/P&gt;&lt;P&gt;define Cnty_Stat / display 'County' Width=25;&lt;/P&gt;&lt;P&gt;define sf2012 / analysis sum 'SF Dir' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define SF_V / analysis mean&amp;nbsp;&amp;nbsp; 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define sft2012 / analysis sum 'SF Total' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define SF_TOT_V / analysis mean weight=sftall 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define sfcompl2012 / analysis sum 'SF Comp' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define SF_COMP_V / analysis mean weight=sfcompl2012 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define mf2012 / analysis sum 'MF Dir' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define MF_V / analysis mean weight=mf2012 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define mft2012 / analysis sum 'MF Tot' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define MF_TOT_V / analysis mean weight=mftall 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define mfcompl2012 / analysis sum&amp;nbsp; 'MF Comp' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define MF_COMP_V / analysis mean weight=mfcompl2012 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define TotDir / analysis sum 'Tot Dir' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define TotDirV / analysis mean weight=TotDir 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define TotUnits / analysis sum 'Tot Units' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define TotUnitsV / analysis mean weight=TotUnits 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define TotComp / analysis sum 'Tot Comp' Width=4;&lt;/P&gt;&lt;P&gt;define TotalV / display 'V%' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define sftall / noprint;&lt;/P&gt;&lt;P&gt;define salescode / group;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compute Cnty_Stat;&lt;/P&gt;&lt;P&gt;bg +1;&lt;/P&gt;&lt;P&gt;if mod(bg,2)=1 then &lt;/P&gt;&lt;P&gt;call define(_row_, "style", "Style={background=white}");&lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;call define(_row_, "style", "Style={background=#d1e9d1}");&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break after salescode /&amp;nbsp; page summarize;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 20:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123880#M34054</guid>
      <dc:creator>Aaronlane</dc:creator>
      <dc:date>2012-09-17T20:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: I need PROC REPORT to summarize to a weighted average! Arrrgh!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123881#M34055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a simple sample data , and the output or result you need .&lt;/P&gt;&lt;P&gt;Your code is too long to read. and you have so many 'weight=', I suggest you to process your data firstly by using data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 03:18:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123881#M34055</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-09-18T03:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: I need PROC REPORT to summarize to a weighted average! Arrrgh!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123882#M34056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I never used WEIGHT option to calculate the weight mean. here is an idea, can you define a computed var to accumulate SF_TOT_V based on the weight variable? the SF_TOT_V and SFTALL defined with noprint option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 03:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123882#M34056</guid>
      <dc:creator>AUTigers</dc:creator>
      <dc:date>2012-09-18T03:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: I need PROC REPORT to summarize to a weighted average! Arrrgh!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123883#M34057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample dataset:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 512px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;&lt;/TD&gt;&lt;TD colspan="3" width="192"&gt;What I want it to ouput:&lt;/TD&gt;&lt;TD width="64"&gt;&lt;/TD&gt;&lt;TD colspan="3" width="192"&gt;How it looks instead&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;SF_2011&lt;/TD&gt;&lt;TD&gt;SF_2012&lt;/TD&gt;&lt;TD&gt;V%&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;SF_2011&lt;/TD&gt;&lt;TD&gt;SF_2012&lt;/TD&gt;&lt;TD&gt;V%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD align="right"&gt;19&lt;/TD&gt;&lt;TD align="right"&gt;17&lt;/TD&gt;&lt;TD align="right"&gt;-12&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD align="right"&gt;19&lt;/TD&gt;&lt;TD align="right"&gt;17&lt;/TD&gt;&lt;TD align="right"&gt;-12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD align="right"&gt;13&lt;/TD&gt;&lt;TD align="right"&gt;121&lt;/TD&gt;&lt;TD align="right"&gt;838&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD align="right"&gt;13&lt;/TD&gt;&lt;TD align="right"&gt;121&lt;/TD&gt;&lt;TD align="right"&gt;838&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Total&lt;/TD&gt;&lt;TD align="right"&gt;32&lt;/TD&gt;&lt;TD align="right"&gt;138&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;328&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD align="right"&gt;32&lt;/TD&gt;&lt;TD align="right"&gt;138&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;736&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that 328 is the "right answer." Between 2011 and 2012 housing starts have increases from 32 to 138, an increase of 328%. Using rbreak summarize, I can ONLY calculate using the -12 and the 838 in the column... So frustrating.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 13:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123883#M34057</guid>
      <dc:creator>Aaronlane</dc:creator>
      <dc:date>2012-09-18T13:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: I need PROC REPORT to summarize to a weighted average! Arrrgh!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123884#M34058</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; PROC REPORT is quite capable of doing a calculation on the RBREAK. For example, if I look at SASHELP.CLASS and only at ages 12 and 14, I can sum up the HEIGHT and WEIGHT variables and do a division. (Silly calculation, I know, but I wanted to keep it simple, since you don't provide any data and it almost looks to me like you are trying to "precalculate" everything in a DATA step program instead of letting REPORT do the work.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So, here's the program and the output is shown below in the screenshot. At the RBREAK, the sum of all the HEIGHT values is 556.8 and the sum of all the WEIGHT values is 879.5 if I subtract those 2 values, (with my trusty calculator), I get 322.7 -- and then if I divide 322.7 (the difference) by 879.5 (the sum of the WEIGHT variable column), I get 0.3669130187606595 which, when formatted with the PERCENT format (which multiplies by 100), displays as&amp;nbsp;&amp;nbsp; 36.69%. This proves to me that at the RBREAK, PROC REPORT is correctly calculating what I have in the COMPUTE block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Numeric variables are treated as though you want a SUM for the analysis usage -- so if you have "precalculated" your numbers, then in the V% column, PROC REPORT has no choice but to add up those numbers. But, as you can see, if you let PROC REPORT do the work, it will execute a COMPUTE block correctly at the RBREAK. Since I'm not entirely sure what's happening with your DATA step program, it's hard to provide constructive advice about the overall method or code your using. However, Tech Support could look at ALL your data and ALL your code and help you come to a resolution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** sort of silly to calc a percent using student WEIGHT and HEIGHT ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** variables but the numbers are easy to double check;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** DIFF is calculated separately just for the sake;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** of checking the numbers;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** and FAKEPCT is the DIFF divided by the number for the WEIGHT variable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.class nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where age in (12, 14);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column age sex n height weight diff fakepct;&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 sex / 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 diff / computed;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define fakepct / computed f=percent9.2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute diff;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; diff = weight.sum - height.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 fakepct;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fakepct = diff / 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; rbreak after / summarize;&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;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11455iB845FA63871427B0/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="calc_diff_pct.png" title="calc_diff_pct.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 15:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123884#M34058</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-09-18T15:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: I need PROC REPORT to summarize to a weighted average! Arrrgh!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123885#M34059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ohhh Cynthia... I sing unto your praises... my Proc Report is beeeeaaaautiful now! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="margin-left: 3.0pt; table-layout: fixed; padding: 0 3.0pt 0 3.0pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="68"&gt;&lt;P style="margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;SPAN style="color: black;"&gt;99&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="111"&gt;&lt;P style="margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;SPAN style="color: black;"&gt;DEL NORT, CA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="30"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="42"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="47"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid black 1.0pt; border-top: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="66"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;( 43%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="68"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="111"&gt;&lt;P style="margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;SPAN style="color: black;"&gt;HUMBOLDT, CA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="30"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;( 33%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="42"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;17&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;( 14%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="47"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;74&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid black 1.0pt; border-top: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="66"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;( 13%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="68"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="111"&gt;&lt;P style="margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;SPAN style="color: black;"&gt;LAKE&amp;nbsp;&amp;nbsp;&amp;nbsp; , CA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="30"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="42"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="47"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;19&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid black 1.0pt; border-top: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="66"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;6%&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="68"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="111"&gt;&lt;P style="margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;SPAN style="color: black;"&gt;MENDOCIN, CA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="30"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="42"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;121&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;840%&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="47"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;49&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid black 1.0pt; border-top: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="66"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;( 9%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="68"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="111"&gt;&lt;P style="margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;SPAN style="color: black;"&gt;TRINITY , CA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="30"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="42"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="47"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;19&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid black 1.0pt; border-top: none; background: white; padding: 0 3.0pt 0 3.0pt;" valign="top" width="66"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;(&amp;nbsp;&amp;nbsp;&amp;nbsp; 10%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="68"&gt;&lt;P style="margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;SPAN style="color: black;"&gt;99&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="111"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="30"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;( 33%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="42"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;138&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="56"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;328%&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: solid black 1.0pt; border-bottom: solid black 1.0pt; border-right: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="47"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;165&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid black 1.0pt; border-top: none; background: #D1E9D1; padding: 0 3.0pt 0 3.0pt;" valign="top" width="66"&gt;&lt;P align="right" style="margin-top: 3pt; margin-bottom: 3pt; text-align: right;"&gt;&lt;SPAN style="color: black;"&gt;( 11%)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data=Contract nowindows;&lt;/P&gt;&lt;P&gt;title1 'Contract Performance Summary - Total Share Products';&lt;/P&gt;&lt;P&gt;title2 'Operation: &amp;amp;Name Region: &amp;amp;Region';&lt;/P&gt;&lt;P&gt;title3 'YTD &amp;amp;Month, &amp;amp;Year';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;columns salescode cnty_stat&amp;nbsp; sf2011 sf2012 TryV sft2011 sft2012 TV sfcompl2011 sfcompl2012 sfcompV diff;&lt;/P&gt;&lt;P&gt;define Cnty_Stat / display 'County' Width=25;&lt;/P&gt;&lt;P&gt;define sf2011 / noprint;&lt;/P&gt;&lt;P&gt;define sf2012 / sum 'SF Dir' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define diff / computed noprint;&lt;/P&gt;&lt;P&gt;define TryV / computed f=percent9.;&lt;/P&gt;&lt;P&gt;define sft2011 / sum noprint;&lt;/P&gt;&lt;P&gt;define sft2012 / analysis sum 'SF Total' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define TV / computed f=percent9.;&lt;/P&gt;&lt;P&gt;define sfcompl2011 / sum noprint;&lt;/P&gt;&lt;P&gt;define sfcompl2012 / analysis sum 'SF Comp' Width=4 format=8.0;&lt;/P&gt;&lt;P&gt;define sfcompV / computed f=percent9.;&lt;/P&gt;&lt;P&gt;define salescode / group;&lt;/P&gt;&lt;P&gt;compute diff; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; diff = sf2012.sum - sf2011.sum;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;compute TryV;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TryV = (sf2012.sum-sf2011.sum) / sf2011.sum;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;compute TV;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TV = (sft2012.sum-sft2011.sum) / sft2011.sum;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;compute sfcompV;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sfcompV = (sfcompl2012.sum-sfcompl2011.sum) / sfcompl2011.sum;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compute Cnty_Stat;&lt;/P&gt;&lt;P&gt;bg +1;&lt;/P&gt;&lt;P&gt;if mod(bg,2)=1 then &lt;/P&gt;&lt;P&gt;call define(_row_, "style", "Style={background=white}");&lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;call define(_row_, "style", "Style={background=#d1e9d1}");&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break after salescode /&amp;nbsp; page summarize;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 19:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123885#M34059</guid>
      <dc:creator>Aaronlane</dc:creator>
      <dc:date>2012-09-18T19:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: I need PROC REPORT to summarize to a weighted average! Arrrgh!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123886#M34060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're not the only one...we ALL sing Cynthia's praises!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 16:33:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-need-PROC-REPORT-to-summarize-to-a-weighted-average-Arrrgh/m-p/123886#M34060</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2012-09-19T16:33:20Z</dc:date>
    </item>
  </channel>
</rss>

