<?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 proc tabulate percentages by group and column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/368971#M88010</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to calculate the percentage in proc tabulate for a group of colleges. &amp;nbsp;I've created a sum, then a percentage of a column's total, but&amp;nbsp;my output gives the total percentage based on the entire group of colleges and not an individual college.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title;
proc tabulate data=complement_master format=comma9.;
format FT $fte. level $lvl.;
var sch;
class COLLEGE level ft;
table  (COLLEGE ALL)*(FT ALL='College Total'), SCH*LEVEL*(SUM COLPCTSUM="%"*f=BEST4.)
SCH ALL='Total'
/misstext='0' printmiss;
WHERE SUBJECTCOLL IN ('AR', 'BU');
title 'Table 4 - SCH by College, Type of Faculty and Level of Instruction, % WRONG';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The percentages should only be calculated for the college of "AR" and the College of "BU". &amp;nbsp;Basically, sums and percentages for each college and a total summary for the entire school.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I making sense?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I am using Base SAS 9.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 22:25:13 GMT</pubDate>
    <dc:creator>jsasusr</dc:creator>
    <dc:date>2017-06-20T22:25:13Z</dc:date>
    <item>
      <title>proc tabulate percentages by group and column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/368971#M88010</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to calculate the percentage in proc tabulate for a group of colleges. &amp;nbsp;I've created a sum, then a percentage of a column's total, but&amp;nbsp;my output gives the total percentage based on the entire group of colleges and not an individual college.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title;
proc tabulate data=complement_master format=comma9.;
format FT $fte. level $lvl.;
var sch;
class COLLEGE level ft;
table  (COLLEGE ALL)*(FT ALL='College Total'), SCH*LEVEL*(SUM COLPCTSUM="%"*f=BEST4.)
SCH ALL='Total'
/misstext='0' printmiss;
WHERE SUBJECTCOLL IN ('AR', 'BU');
title 'Table 4 - SCH by College, Type of Faculty and Level of Instruction, % WRONG';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The percentages should only be calculated for the college of "AR" and the College of "BU". &amp;nbsp;Basically, sums and percentages for each college and a total summary for the entire school.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I making sense?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I am using Base SAS 9.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 22:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/368971#M88010</guid>
      <dc:creator>jsasusr</dc:creator>
      <dc:date>2017-06-20T22:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentages by group and column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/368974#M88011</link>
      <description>&lt;P&gt;You can specify a denominator class variable using pctn&amp;lt;classvar&amp;gt; or pctsum&amp;lt;classvar&amp;gt;. Do &lt;STRONG&gt;not&lt;/STRONG&gt; use the &amp;lt;classvar&amp;gt; with rowpct or colpct statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you may be wanting Pctsum&amp;lt;college&amp;gt; instead of colpctsum.&lt;/P&gt;
&lt;P&gt;But without any data its hard to be sure.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 22:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/368974#M88011</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-20T22:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentages by group and column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/369301#M88152</link>
      <description>&lt;P&gt;Thank you. &amp;nbsp;I appreciate your time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I understand you correctly, I modified it a bit to show this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title;
proc tabulate data=complement_master format=comma9.;
format FT $fte. level $lvl.;
var sch;
class COLLEGE level ft;
table  (COLLEGE ALL)*(FT ALL='College Total'), (LEVEL ALL)*SCH*(SUM PCTSUM&amp;lt;COLLEGE ALL&amp;gt;="%"*f=BEST4.)
SCH ALL='Total'
/misstext='0' printmiss;
WHERE SUBJECTCOLL IN ('AR', 'BU');
title 'Table 4 - SCH by College, Type of Faculty and Level of Instruction, % WRONG';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm attaching the output table. &amp;nbsp;The school Architecture is showing 18.3%. &amp;nbsp;It is the percentage of FT (Full Time) to the Total college (1,163/6,357). &amp;nbsp;It should be 1,163/1,527 or 76.2% . &amp;nbsp;I've tried substituting or leaving out ALL in the &amp;lt;COLLEGE&amp;gt; classvar, but the error message is PctSum based is not in table. &amp;nbsp;A PctSum crossing has no denominator.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 19:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/369301#M88152</guid>
      <dc:creator>jsasusr</dc:creator>
      <dc:date>2017-06-21T19:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentages by group and column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/474408#M121898</link>
      <description>&lt;P&gt;Hello, I am&amp;nbsp;facing the same issue ...was this resolved ?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 12:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/474408#M121898</guid>
      <dc:creator>Bedi</dc:creator>
      <dc:date>2018-06-29T12:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentages by group and column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/475216#M122181</link>
      <description>I apologize for the late reply.  I have been out of the country.  That problem wasn't resolved.  It was a while ago, but I think I had to create a work around (i.e, created a different report).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jul 2018 15:06:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentages-by-group-and-column/m-p/475216#M122181</guid>
      <dc:creator>jsasusr</dc:creator>
      <dc:date>2018-07-03T15:06:16Z</dc:date>
    </item>
  </channel>
</rss>

