<?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: Percentages in Summary Tables in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63087#M6373</link>
    <description>I guess this means that it really can't be done just by point and click, or drag and drop.  I could just as easily type the code into a code node.</description>
    <pubDate>Wed, 26 Nov 2008 20:24:19 GMT</pubDate>
    <dc:creator>RHL</dc:creator>
    <dc:date>2008-11-26T20:24:19Z</dc:date>
    <item>
      <title>Percentages in Summary Tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63083#M6369</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to duplicate PROC TABULATE code in EG using the Summary Tables task but have a problem with calculating percentages.  How would you create the equivalent of PCTN&amp;lt; &amp;gt;  (calculating the percentage based on a class variable, not necessarily the whole row or column)?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for any help.</description>
      <pubDate>Tue, 25 Nov 2008 17:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63083#M6369</guid>
      <dc:creator>RHL</dc:creator>
      <dc:date>2008-11-25T17:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages in Summary Tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63084#M6370</link>
      <description>Hi:&lt;BR /&gt;
  I do not know whether there's a way to specify a custom denominator in the EG wizard or task. You may have to generate a simple N and PCTN table and then modify the generated code to use a custom denominator with the &amp;lt; and &amp;gt; angle brackets.&lt;BR /&gt;
&lt;BR /&gt;
  See the code example below. The custom denominator (in the second table definition) tells Proc Tabulate to calculate the PCTN across all the products within each region. So, you would see in this instance, that the PCTN for all the products for each region will add up to 100%.&lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='custom_denom.html' style=sasweb;&lt;BR /&gt;
    &lt;BR /&gt;
proc tabulate data=sashelp.shoes;&lt;BR /&gt;
  where region in ('Asia', 'Canada', 'Pacific');&lt;BR /&gt;
  title 'Compare These Tables';&lt;BR /&gt;
                          &lt;BR /&gt;
  class region product;&lt;BR /&gt;
                      &lt;BR /&gt;
  table region*(product all) all,&lt;BR /&gt;
        n pctn&lt;BR /&gt;
        /box='1) Regular N and PctN';&lt;BR /&gt;
                   &lt;BR /&gt;
  table region*(product all) all,&lt;BR /&gt;
        n pctn&amp;lt;product all&amp;gt;&lt;BR /&gt;
        /box='2) Custom Denominator';&lt;BR /&gt;
                  &lt;BR /&gt;
run;&lt;BR /&gt;
   &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 25 Nov 2008 19:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63084#M6370</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-11-25T19:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages in Summary Tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63085#M6371</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
I've tried to do what you suggested, but I don't think EG allows me to insert code at the point where I need to put the angle brackets.</description>
      <pubDate>Tue, 25 Nov 2008 23:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63085#M6371</guid>
      <dc:creator>RHL</dc:creator>
      <dc:date>2008-11-25T23:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages in Summary Tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63086#M6372</link>
      <description>Hi:&lt;BR /&gt;
  You may be right, that there's no way to insert the code in the EG task.&lt;BR /&gt;
&lt;BR /&gt;
  The thing you may have to do is to highlight the task in EG and then Export the code. Save the code file to a location where you can find it again. Then open the code file in a code node and edit the code.&lt;BR /&gt;
&lt;BR /&gt;
  At this point, you will need to test the code node to be sure that it produces the output you want. Once you know that you've edited the code and are getting the results you want, you probably don't want/need the original Summary Tables Task anymore and can use the code node instead to generate your report.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 26 Nov 2008 01:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63086#M6372</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-11-26T01:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages in Summary Tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63087#M6373</link>
      <description>I guess this means that it really can't be done just by point and click, or drag and drop.  I could just as easily type the code into a code node.</description>
      <pubDate>Wed, 26 Nov 2008 20:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Percentages-in-Summary-Tables/m-p/63087#M6373</guid>
      <dc:creator>RHL</dc:creator>
      <dc:date>2008-11-26T20:24:19Z</dc:date>
    </item>
  </channel>
</rss>

