<?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 freq equivalent in Proc report in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580187#M75606</link>
    <description>&lt;P&gt;If you want it to look exactly like Proc Freq then use proc freq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or maybe a different procedure.&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.shoes;
   class region product;
   table region ,
         (product  all='Region Total')*(n pctn rowpctn colpctn)
   ;
run;
&lt;/PRE&gt;</description>
    <pubDate>Fri, 09 Aug 2019 15:58:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-08-09T15:58:05Z</dc:date>
    <item>
      <title>Proc freq equivalent in Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580114#M75604</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am currently trying to create a proc freq equivalent in proc report.&lt;/P&gt;
&lt;P&gt;For example:: the proc freq version is as follows::&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc freq data=sashelp.shoes ;
tables region * product/ nocol nocum nopercent;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;i wrote the following proc report version, but it does not look like the cross table created by proc freq.&lt;/P&gt;
&lt;P&gt;For example:: the row percentages are missing.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.shoes;
column region product n pctn;
define region /group order=internal;
define product /group ;
define n / 'Frequency';
define pctn / 'Percent' across f=percent9.2;
rbreak after/ summarize style=Header;
compute after;
region="Total";
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any help?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 13:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580114#M75604</guid>
      <dc:creator>sebster24</dc:creator>
      <dc:date>2019-08-09T13:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq equivalent in Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580122#M75605</link>
      <description>&lt;P&gt;please do not mention the across in define PCTN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.shoes;
column region product n pctn;
define region /group order=internal;
define product /group ;
define n / 'Frequency';
define pctn / 'Percent'  f=percent9.2;
rbreak after/ summarize style=Header;
compute after;
region="Total";
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Aug 2019 13:48:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580122#M75605</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-08-09T13:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq equivalent in Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580187#M75606</link>
      <description>&lt;P&gt;If you want it to look exactly like Proc Freq then use proc freq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or maybe a different procedure.&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.shoes;
   class region product;
   table region ,
         (product  all='Region Total')*(n pctn rowpctn colpctn)
   ;
run;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Aug 2019 15:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580187#M75606</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-09T15:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq equivalent in Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580251#M75607</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I agree -- if you need the cross-tab table to look like PROC FREQ, it is the only procedure that will stack the values in cells as you show.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Neither PROC TABULATE nor PROC REPORT will stack the values, although you could get a cross-tab from either procedure, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="not_stack.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31646iB226CE8C808C4444/image-size/large?v=v2&amp;amp;px=999" role="button" title="not_stack.png" alt="not_stack.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each of those procedures will want the N and the Row Percent to have a separate column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 19:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-equivalent-in-Proc-report/m-p/580251#M75607</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-08-09T19:36:13Z</dc:date>
    </item>
  </channel>
</rss>

