<?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 incorrect column percentages in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474280#M71081</link>
    <description>&lt;P&gt;Remove the format and are they still 0?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jun 2018 21:59:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-06-28T21:59:18Z</dc:date>
    <item>
      <title>proc tabulate incorrect column percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474277#M71080</link>
      <description>&lt;P&gt;I am using proc tabulate to create a table like the one below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="percenttotal.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21493iED4C1D3B51C0764A/image-size/large?v=v2&amp;amp;px=999" role="button" title="percenttotal.PNG" alt="percenttotal.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is intended to count the number of observations for each hospital location by year. Additionally, I would like to generate column percentages for each year's observations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to create my desired layout, but my column percentage totals are coming out to 0%. They should be 100%. I can't seem to figure out what has happened with my nesting to cause this error. Any assistance would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code that I am using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc tabulate data=mydata ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CLASS location specdateYR/ PRELOADFMT order=data;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CLASSLEV location specdateYR/ S=[background=bigb foreground=white];&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TABLE location = ' ' (ALL = {label='Total' S=[background=bigb foreground=white]}),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(specdateYR = ' ' (All= {label='Total' S=[background=bigb foreground=white]}))&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*((N= {label='N Events' S=[background=bigb foreground=white]})&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((colpctn= {label='% Events' S=[background=bigb foreground=white]})*f=pctfmt.))&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/misstext='0' BOX=[label='Events By Year and Location*' S=[background=bigb foreground=white]];&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 21:52:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474277#M71080</guid>
      <dc:creator>sasuser34</dc:creator>
      <dc:date>2018-06-28T21:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate incorrect column percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474280#M71081</link>
      <description>&lt;P&gt;Remove the format and are they still 0?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 21:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474280#M71081</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-28T21:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate incorrect column percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474293#M71082</link>
      <description>&lt;P&gt;Show the definitions of your PCTFMT. Likely you didn't allocate the correct options to show 100.00%.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 22:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474293#M71082</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-28T22:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate incorrect column percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474432#M71096</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the format I was using.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;picture pctfmt (round) other='09.99%';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realized that my format did not allow for 3 digits. I changed the format to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;picture pctfmt (round) other='009.99%';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which corrected the issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for pointing me in the right direction!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 13:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-incorrect-column-percentages/m-p/474432#M71096</guid>
      <dc:creator>sasuser34</dc:creator>
      <dc:date>2018-06-29T13:44:38Z</dc:date>
    </item>
  </channel>
</rss>

