<?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: Percentage of total in column header to right in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Percentage-of-total-in-column-header-to-right/m-p/705264#M216306</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=have NOWD Wrap style(summary)=Header;
	columns Team Tot_Num_Bats Tot_Num_Hits Pct_Num_Bats;

	define Tot_Num_Bats / sum "Total # Bats" ;
	define Tot_Num_Hits / sum "Total # Hits" ;
	define Pct_Num_Bats  /computed f=percent8.2 ;

	compute Pct_Num_Bats;
		Pct_Num_Bats= Tot_Num_Hits.sum/Tot_Num_Bats.sum;
	endcomp;
	rbreak after / summarize style (summary)= Header;
	compute after;
		Team = 'Total';
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 11 Dec 2020 08:58:01 GMT</pubDate>
    <dc:creator>blueskyxyz</dc:creator>
    <dc:date>2020-12-11T08:58:01Z</dc:date>
    <item>
      <title>Percentage of total in column header to right</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentage-of-total-in-column-header-to-right/m-p/705211#M216274</link>
      <description>&lt;P&gt;proc sql;&lt;BR /&gt;create table have as&lt;BR /&gt;select Team,&lt;BR /&gt;sum(nAtBat) as Tot_Num_Bats,&lt;BR /&gt;sum(nHits) as Tot_Num_Hits&lt;BR /&gt;from sashelp.baseball&lt;BR /&gt;where team in ('Atlanta','Baltimore','&lt;BR /&gt;Boston','California','Chicago','Cincinnati','&lt;BR /&gt;Cleveland')&lt;BR /&gt;group by Team&lt;BR /&gt;having sum(nAtBat) &amp;gt;0&lt;BR /&gt;order by Team&lt;BR /&gt;;quit;&lt;/P&gt;
&lt;P&gt;proc report data=have NOWD Wrap style(summary)=Header;&lt;BR /&gt;columns Team Tot_Num_Bats Tot_Num_Hits Pct_Num_Bats;&lt;/P&gt;
&lt;P&gt;define Tot_Num_Bats / sum "Total # Bats" ;&lt;BR /&gt;define Tot_Num_Hits / sum "Total # Hits" ;&lt;BR /&gt;define Pct_Num_Bats /computed f=percent8.2 "%Hits" ;&lt;BR /&gt;compute Team; &lt;BR /&gt;endcomp;&lt;BR /&gt;rbreak after / summarize style (summary)= Header; &lt;BR /&gt;compute after;&lt;BR /&gt;Team = 'Total';&lt;BR /&gt;endcomp; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get the total at the bottom.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I get the percentage of the total to show in the far right column (in this case&amp;nbsp;Pct_Num_Bats).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to do the same for Tot_Num_Hits&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 22:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentage-of-total-in-column-header-to-right/m-p/705211#M216274</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2020-12-10T22:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of total in column header to right</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentage-of-total-in-column-header-to-right/m-p/705264#M216306</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=have NOWD Wrap style(summary)=Header;
	columns Team Tot_Num_Bats Tot_Num_Hits Pct_Num_Bats;

	define Tot_Num_Bats / sum "Total # Bats" ;
	define Tot_Num_Hits / sum "Total # Hits" ;
	define Pct_Num_Bats  /computed f=percent8.2 ;

	compute Pct_Num_Bats;
		Pct_Num_Bats= Tot_Num_Hits.sum/Tot_Num_Bats.sum;
	endcomp;
	rbreak after / summarize style (summary)= Header;
	compute after;
		Team = 'Total';
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Dec 2020 08:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentage-of-total-in-column-header-to-right/m-p/705264#M216306</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-12-11T08:58:01Z</dc:date>
    </item>
  </channel>
</rss>

