<?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 calculation in PROC TABULATE in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Percentage-calculation-in-PROC-TABULATE/m-p/582113#M75679</link>
    <description>Hi:&lt;BR /&gt;  For purposes of completeness:&lt;BR /&gt;PCTN  PCTSUM&lt;BR /&gt;ROWPCTN ROWPCTSUM&lt;BR /&gt;COLPCTN COLPCTSUM&lt;BR /&gt;REPPCTN REPPCTSUM&lt;BR /&gt;PAGEPCTN PAGEPCTSUM&lt;BR /&gt;&lt;BR /&gt;are all the percent statistics. Using one of these depends on whether you want the percent of the count (N) or the percent of a numeric variable (PCTSUM). Look in the TABULATE documentation and note that TABULATE does an automatic multiply by 100, so you need to use a PICTURE format to get the % sign into the TABULATE output.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
    <pubDate>Mon, 19 Aug 2019 14:16:26 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2019-08-19T14:16:26Z</dc:date>
    <item>
      <title>Percentage calculation in PROC TABULATE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Percentage-calculation-in-PROC-TABULATE/m-p/582057#M75677</link>
      <description>&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used Proc tabulate procedure to solve the tally information of the given (sample dataset) table.&lt;/P&gt;&lt;P&gt;But I required a tally of the Percentage columns as 100%. For more details kindly go through the below information.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data aaa;
input ID age$ sex$ Emp$;
cards;
1 18-25 M Govt
2 50-60 F Pvt
6 26-35 F Govt
8 18-25 M Pvt
4 26-35 F Govt
5 36-45 M Govt
9 46-55 M Pvt
3 18-25 M Govt
0 36-45 M Govt
;
proc tabulate data = aaa;
class age sex Emp;
tables age all,Emp*(sex=' ' *(n*f=8. reppctn='%')) all='Total'*(n*f=8. reppctn='%')/rts=10;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you run the above code. It results N and % of 9 observations as Gender and Employment wise.&lt;/P&gt;&lt;P&gt;But I require a % column to calculate its value as 100% of its gender and employment like the Image given below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tab.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31836i4D4F414510A44FC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="tab.jpg" alt="tab.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest the code which results in an image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you require any clarification. I will be glad to help.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 07:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Percentage-calculation-in-PROC-TABULATE/m-p/582057#M75677</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2019-08-19T07:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage calculation in PROC TABULATE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Percentage-calculation-in-PROC-TABULATE/m-p/582064#M75678</link>
      <description>&lt;P&gt;You have used in your code REPPCT which is percentage per report.&lt;/P&gt;
&lt;P&gt;You can use ROWPCTN to calculate row percentage or use PCTSUM to calculate column percentage.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 08:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Percentage-calculation-in-PROC-TABULATE/m-p/582064#M75678</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-08-19T08:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage calculation in PROC TABULATE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Percentage-calculation-in-PROC-TABULATE/m-p/582113#M75679</link>
      <description>Hi:&lt;BR /&gt;  For purposes of completeness:&lt;BR /&gt;PCTN  PCTSUM&lt;BR /&gt;ROWPCTN ROWPCTSUM&lt;BR /&gt;COLPCTN COLPCTSUM&lt;BR /&gt;REPPCTN REPPCTSUM&lt;BR /&gt;PAGEPCTN PAGEPCTSUM&lt;BR /&gt;&lt;BR /&gt;are all the percent statistics. Using one of these depends on whether you want the percent of the count (N) or the percent of a numeric variable (PCTSUM). Look in the TABULATE documentation and note that TABULATE does an automatic multiply by 100, so you need to use a PICTURE format to get the % sign into the TABULATE output.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Mon, 19 Aug 2019 14:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Percentage-calculation-in-PROC-TABULATE/m-p/582113#M75679</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-08-19T14:16:26Z</dc:date>
    </item>
  </channel>
</rss>

