<?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 tabulate -Row PCT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746501#M234188</link>
    <description>&lt;P&gt;In recent releases of PROC FREQ, you can use the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_012/statug/statug_freq_syntax08.htm#statug.freq.freqformatp" target="_self"&gt;FORMATP=&lt;/A&gt;&amp;nbsp;option in the TABLES statement to format the percentages in crosstabulation tables.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jun 2021 16:15:37 GMT</pubDate>
    <dc:creator>Watts</dc:creator>
    <dc:date>2021-06-08T16:15:37Z</dc:date>
    <item>
      <title>Proc tabulate -Row PCT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746395#M234138</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;This code calculate frequency of two way table .&lt;/P&gt;
&lt;P&gt;In each cell we get number of rows.&lt;/P&gt;
&lt;P&gt;I want to ask what is the way to create same structure of table with percent from total in each row.&lt;/P&gt;
&lt;P&gt;For example:In first row there will be:&lt;/P&gt;
&lt;P&gt;3/158=1/9% ,25/158=15.82% ,94/158=59.49%,17/158=10.76%,8/158=5.06%,11/158=6.96% ,158/158=100%&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I want to see the results in Percent format with % symbol&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;What is the way to do it please?&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=sashelp.cars missing;
Title 'Two Way freq table';
class Origin  Type;
var MSRP;
table Origin='' ALL,Type='Type Of car'*N=''*MSRP=''*F=Comma21. ALL/box='Origin of Car' misstext='0' ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jun 2021 05:24:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746395#M234138</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-06-08T05:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate -Row PCT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746397#M234139</link>
      <description>&lt;P&gt;I don't have a clue what you are doing with MSRP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really want to see a % sign you have two choices. One is to make and use a VAR variable that is numeric with the MEAN statistic that will make the correct values and a percent format. Typically that new variable would be 1/0 coded variable with 1 meaning the characteristic of interest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if you want to use ROWPCTN you need to make format that will look like a percent such as:&lt;/P&gt;
&lt;PRE&gt;proc format;
picture fakepercent
low-high = '009.99%'
;
run;

proc tabulate data=sashelp.cars missing;
Title 'Two Way freq table';
class Origin  Type;
var MSRP;
table Origin='' ALL,
     Type='Type Of car'*rowpctN=''*f=fakepercent. ALL
     /box='Origin of Car' misstext='0' ;
run;&lt;/PRE&gt;
&lt;P&gt;If the only missing text will be with the percent then you would set misstext='0%' or similar. However if you may have more than one value missing your percents are going to look like your misstext setting. In which case perhaps a blank will be less jarring in appearance than a column/row with mixed percent signs and not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally, I find % in a table to be messy.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 06:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746397#M234139</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-08T06:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate -Row PCT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746439#M234156</link>
      <description>&lt;P&gt;How about simplifying life:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.cars;
   table Origin * Type / nocol nopercent nofreq;
   label Origin = 'Origin of Car'  type='Type of Car';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jun 2021 12:35:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746439#M234156</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-06-08T12:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate -Row PCT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746485#M234181</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How about simplifying life:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.cars;
   table Origin * Type / nocol nopercent nofreq;
   label Origin = 'Origin of Car'  type='Type of Car';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;OP explicitly states he wants the percent sign:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;3/158=1/9% ,25/158=15.82% ,94/158=59.49%,17/158=10.76%,8/158=5.06%,11/158=6.96% ,158/158=100%&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I want to see the results in Percent format with &lt;STRONG&gt;% symbol&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Proc freq won't show the %.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 15:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746485#M234181</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-08T15:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate -Row PCT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746501#M234188</link>
      <description>&lt;P&gt;In recent releases of PROC FREQ, you can use the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_012/statug/statug_freq_syntax08.htm#statug.freq.freqformatp" target="_self"&gt;FORMATP=&lt;/A&gt;&amp;nbsp;option in the TABLES statement to format the percentages in crosstabulation tables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 16:15:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-Row-PCT/m-p/746501#M234188</guid>
      <dc:creator>Watts</dc:creator>
      <dc:date>2021-06-08T16:15:37Z</dc:date>
    </item>
  </channel>
</rss>

