<?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: Suppressing a column in a proc frequently table in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535035#M22370</link>
    <description>I don't think you want totals, I think you want the percents. Add the OUTPCT option to the TABLE statement to get those as well.&lt;BR /&gt;&lt;BR /&gt;The PROC MEANS solution mentioned by another would also work.</description>
    <pubDate>Tue, 12 Feb 2019 22:09:32 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-02-12T22:09:32Z</dc:date>
    <item>
      <title>Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534923#M22359</link>
      <description>I created a frequency table in the following form:&lt;BR /&gt;&lt;BR /&gt;                       No (0)        Yes (1)          Total&lt;BR /&gt;&lt;BR /&gt;Group A.          16               27                43&lt;BR /&gt;Group B.           25.             67                92&lt;BR /&gt;Group C.           37              91               128&lt;BR /&gt;&lt;BR /&gt;Since I only wanted to see the Yes (1) column in the output,&lt;BR /&gt;I used a where statement in proc freq to remove the no (1) column.&lt;BR /&gt;&lt;BR /&gt;However, this is how I want the final table to look:&lt;BR /&gt;&lt;BR /&gt;                                    Yes(1)           Total&lt;BR /&gt;&lt;BR /&gt;Group A.                       41                  %&lt;BR /&gt;Group B.                       62                  %&lt;BR /&gt;Group C.                       88                  %&lt;BR /&gt;&lt;BR /&gt;In PROC FREQ, both columns produce the exact same values. &lt;BR /&gt;I want the output to show the percentage of the total dataset including the column that is not included in the output.  So what I need to do is create a variable for a new column with the following calculation:  Pct = Yes(1) / Total (for each group)&lt;BR /&gt;&lt;BR /&gt;I couldn’t get it to work in PROC FREQ but is there a way to do it in PROC REPORT or PROC TABULATE?&lt;BR /&gt;&lt;BR /&gt;Any assistance would be greatly appreciated. Thanks &lt;BR /&gt;.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Feb 2019 16:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534923#M22359</guid>
      <dc:creator>greg6363</dc:creator>
      <dc:date>2019-02-12T16:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534925#M22361</link>
      <description>&lt;P&gt;A quick way is to capture the PROC FREQ output, filter it using a WHERE and then display the results using PROC PRINT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/21164"&gt;@greg6363&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I created a frequency table in the following form:&lt;BR /&gt;&lt;BR /&gt;No (0) Yes (1) Total&lt;BR /&gt;&lt;BR /&gt;Group A. 16 27 43&lt;BR /&gt;Group B. 25. 67 92&lt;BR /&gt;Group C. 37 91 128&lt;BR /&gt;&lt;BR /&gt;Since I only wanted to see the Yes (1) column in the output,&lt;BR /&gt;I used a where statement in proc freq to remove the no (1) column.&lt;BR /&gt;&lt;BR /&gt;However, this is how I want the final table to look:&lt;BR /&gt;&lt;BR /&gt;Yes(1) Total&lt;BR /&gt;&lt;BR /&gt;Group A. 41 %&lt;BR /&gt;Group B. 62 %&lt;BR /&gt;Group C. 88 %&lt;BR /&gt;&lt;BR /&gt;In PROC FREQ, both columns produce the exact same values. &lt;BR /&gt;I want the output to show the percentage of the total dataset including the column that is not included in the output. So what I need to do is create a variable for a new column with the following calculation: Pct = Yes(1) / Total (for each group)&lt;BR /&gt;&lt;BR /&gt;I couldn’t get it to work in PROC FREQ but is there a way to do it in PROC REPORT or PROC TABULATE?&lt;BR /&gt;&lt;BR /&gt;Any assistance would be greatly appreciated. Thanks &lt;BR /&gt;.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 22:34:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534925#M22361</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-12T22:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534947#M22364</link>
      <description>&lt;P&gt;For a 0/1 variable, the % of 1's will be the mean of the variable.&amp;nbsp; Just use (guessing at your variable names here):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc means data=have mean;&lt;/P&gt;
&lt;P&gt;var flagvar;&lt;/P&gt;
&lt;P&gt;class group;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 18:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534947#M22364</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-12T18:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534999#M22367</link>
      <description>I should have been clearer in my question. I followed Reeza’s suggestion and put the where statement within the PROC PRINT procedure. In addition, I went back to the PROC FREQ procedure and used an OUT= statement to create a dataset out of the frequency table but the TOTAL column is not included in the output dataset. How can I get that TOTAL column to be included in the output data set?</description>
      <pubDate>Tue, 12 Feb 2019 20:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/534999#M22367</guid>
      <dc:creator>greg6363</dc:creator>
      <dc:date>2019-02-12T20:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535000#M22368</link>
      <description>I think it's time to show your work.</description>
      <pubDate>Tue, 12 Feb 2019 20:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535000#M22368</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-12T20:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535011#M22369</link>
      <description>Good idea. Here is the code:&lt;BR /&gt;&lt;BR /&gt;PROC FREQ data=sample1 order=freq;&lt;BR /&gt;          table group*status/ norow nocol out=sample2&lt;BR /&gt;          plots=freqplot(type=dot);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;PROC PRINT data=sample2&lt;BR /&gt;where status=1;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;When the sample2 output data file is generated, the totals are not included which I need to include.</description>
      <pubDate>Tue, 12 Feb 2019 21:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535011#M22369</guid>
      <dc:creator>greg6363</dc:creator>
      <dc:date>2019-02-12T21:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535035#M22370</link>
      <description>I don't think you want totals, I think you want the percents. Add the OUTPCT option to the TABLE statement to get those as well.&lt;BR /&gt;&lt;BR /&gt;The PROC MEANS solution mentioned by another would also work.</description>
      <pubDate>Tue, 12 Feb 2019 22:09:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535035#M22370</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-12T22:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535043#M22371</link>
      <description>No, I want the Total column produced in the frequency table. It’s not being produced in the output data set.</description>
      <pubDate>Tue, 12 Feb 2019 22:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535043#M22371</guid>
      <dc:creator>greg6363</dc:creator>
      <dc:date>2019-02-12T22:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535047#M22372</link>
      <description>I'm working off your WANT data set in your original post. There's no total shown there. If your requirements have changed please show the newly desired data set please.</description>
      <pubDate>Tue, 12 Feb 2019 22:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535047#M22372</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-12T22:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535052#M22373</link>
      <description>I put a Total column in my original output. This is what the PROC FREQ procedure produces:&lt;BR /&gt;&lt;BR /&gt;                              No (0).       Yes(1).      Total&lt;BR /&gt;&lt;BR /&gt;Group A.   Freq.     24858.        948.        25806&lt;BR /&gt;                  Pct.       53.45.        2.04.        55.49&lt;BR /&gt;Group B.    Freq.     6394.         700          7094&lt;BR /&gt;                   Pct.       13.75.        1.51.        15.25&lt;BR /&gt;Group C.    Freq.       3491.        514.          4005&lt;BR /&gt;                   Pct.         7.51.         1.11.         8.61&lt;BR /&gt;Group D      Freq.       3625.        355.          3980&lt;BR /&gt;                    Pct.         7.80.         0.76.         8.56&lt;BR /&gt;&lt;BR /&gt;When I use the WHERE statement in PROC PRINT, it will remove either column but when I use that option, I still want to see the Total column that will reflect the overall number of observations in the data set compared to the printed condition.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Feb 2019 22:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535052#M22373</guid>
      <dc:creator>greg6363</dc:creator>
      <dc:date>2019-02-12T22:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing a column in a proc frequently table</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535295#M22382</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/21164"&gt;@greg6363&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, this is how I want the final table to look:&lt;BR /&gt;&lt;BR /&gt;Yes(1) Total&lt;BR /&gt;&lt;BR /&gt;Group A. 41 %&lt;BR /&gt;Group B. 62 %&lt;BR /&gt;Group C. 88 %&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is what I'm referring to. If this has changed, post what you want the new output table to look like.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 17:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Suppressing-a-column-in-a-proc-frequently-table/m-p/535295#M22382</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-13T17:03:16Z</dc:date>
    </item>
  </channel>
</rss>

