<?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 percentgae of column based on column total in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Report-percentgae-of-column-based-on-column-total/m-p/420669#M27063</link>
    <description>&lt;P&gt;a compute block to get the total of bay before all the computation will suffice&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
Proc Report data=test;
	Column queue_cd Bay BayPct Network BayPercent;
	Define Queue_CD / Display 'Queue';
		Define Bay / Display 'Baylink' Analysis sum f=comma9.;
		Define BayPct / Computed 'Bay Percent' f=percent9.2;
		Define Network / Display 'Network' Analysis sum f=comma9.0;
		Define BayPercent / Computed 'Bay Percent of Network' f=percent9.2;
			
			 compute  before; 
				 Bay_tot = Bay.sum; 
				 endcomp;

			Compute BayPct;
				BayPct = Bay.sum / Bay_tot;
					Endcomp;
			Compute BayPercent;
				BayPercent = Bay.sum / Network.sum;
					Endcomp;
		Rbreak after / summarize;
RUN;  &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Dec 2017 04:02:55 GMT</pubDate>
    <dc:creator>RM6</dc:creator>
    <dc:date>2017-12-13T04:02:55Z</dc:date>
    <item>
      <title>Proc Report percentgae of column based on column total</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Report-percentgae-of-column-based-on-column-total/m-p/420650#M27062</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the percentage of each an observation within that variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this cade at the moment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data test;
	Input QUEUE_CD $ Bay Network;
	Datalines;
ABS 1 22949
ACD 1 3767
ACE 2 967
ACR 18 20513
ADV 5 92382
ALD 1 1764
ALE 17 13243
ALY 2 5128
CCB 1 25006
CHK 3295 25129

;
Run;


Proc Report data=test;
	Column queue_cd Bay Network BayPercent;
	Define Queue_CD / Display 'Queue';
		Define Bay / Display 'Baylink' Analysis sum f=comma9.;
		Define Network / Display 'Network' Analysis sum f=comma9.0;
		Define BayPercent / Computed 'Bay Percent of Network' f=percent9.2;
			Compute BayPercent;
				BayPercent = Bay.sum / Network.sum;
					Endcomp;
		Rbreak after / summarize;
RUN;  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which gives me the output of&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;&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; Need to add the Bay Percent into the Proc Report&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bay1.GIF" style="width: 305px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17175iD3F7929F2264EE4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bay1.GIF" alt="Bay1.GIF" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bay2.GIF" style="width: 337px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17176iE7C7EAE049440295/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bay2.GIF" alt="Bay2.GIF" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 01:06:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Report-percentgae-of-column-based-on-column-total/m-p/420650#M27062</guid>
      <dc:creator>DME790</dc:creator>
      <dc:date>2017-12-13T01:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report percentgae of column based on column total</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Report-percentgae-of-column-based-on-column-total/m-p/420669#M27063</link>
      <description>&lt;P&gt;a compute block to get the total of bay before all the computation will suffice&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
Proc Report data=test;
	Column queue_cd Bay BayPct Network BayPercent;
	Define Queue_CD / Display 'Queue';
		Define Bay / Display 'Baylink' Analysis sum f=comma9.;
		Define BayPct / Computed 'Bay Percent' f=percent9.2;
		Define Network / Display 'Network' Analysis sum f=comma9.0;
		Define BayPercent / Computed 'Bay Percent of Network' f=percent9.2;
			
			 compute  before; 
				 Bay_tot = Bay.sum; 
				 endcomp;

			Compute BayPct;
				BayPct = Bay.sum / Bay_tot;
					Endcomp;
			Compute BayPercent;
				BayPercent = Bay.sum / Network.sum;
					Endcomp;
		Rbreak after / summarize;
RUN;  &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Dec 2017 04:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Report-percentgae-of-column-based-on-column-total/m-p/420669#M27063</guid>
      <dc:creator>RM6</dc:creator>
      <dc:date>2017-12-13T04:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report percentgae of column based on column total</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Report-percentgae-of-column-based-on-column-total/m-p/420759#M27066</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data test;
	Input QUEUE_CD $ Bay Network;
	Datalines;
ABS 1 22949
ACD 1 3767
ACE 2 967
ACR 18 20513
ADV 5 92382
ALD 1 1764
ALE 17 13243
ALY 2 5128
CCB 1 25006
CHK 3295 25129

;
Run;


Proc Report data=test nowd;
	Column queue_cd Bay Bay_Percent Network BayPercent;
	Define Queue_CD / Display 'Queue';
		Define Bay / Display 'Baylink' Analysis sum f=comma9.;
		Define Bay_Percent / Computed 'Bay Percent' f=percent9.2;

		Define Network / Display 'Network' Analysis sum f=comma9.0;
		Define BayPercent / Computed 'Bay Percent of Network' f=percent9.2;
			Compute BayPercent;
				BayPercent = Bay.sum / Network.sum;
			Endcomp;

			compute before;
             sum=bay.sum;
			endcomp;
			Compute Bay_Percent;
				Bay_Percent = Bay.sum / sum;
			Endcomp;

		Rbreak after / summarize;
RUN;  &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Dec 2017 12:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Report-percentgae-of-column-based-on-column-total/m-p/420759#M27066</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-12-13T12:34:38Z</dc:date>
    </item>
  </channel>
</rss>

