<?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: How can I include missing data in counts but not print the row or column of the missing value in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-tabulate-How-can-I-include-missing-data-in-counts-but-not/m-p/212220#M14001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may be a case of needing to presummarize the data prior to display. To include var values associated with a class variable the class variable value must appear in the output - missing as it were with that option set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be tempted to try the tabulate code (without style overrides as not needed) to create an output data set.&lt;/P&gt;&lt;P&gt;Then use that as input to a modified code to display the values but drop the records where that variable is missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jun 2015 19:10:40 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-06-23T19:10:40Z</dc:date>
    <item>
      <title>Proc tabulate: How can I include missing data in counts but not print the row or column of the missing value</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-tabulate-How-can-I-include-missing-data-in-counts-but-not/m-p/212219#M14000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am runing proc tabulate using ODS to output to xml files for use in Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to count records with unknown values in the calculation of percents, but I don't want to print the unknown data (highlighted in &lt;SPAN style="color: #ff0000;"&gt;red&lt;/SPAN&gt;) in my proc tabulate output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;For ease of reference, I have numbered the different columns 1 to 12.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the snippet of the output from proc tabulate, I need to count the 6 unknown records in column 4 in the total count in column 2, but I don't want to print columns 4 through 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want to count in my total cases (column 2) the missing data (column 4) for the column variable, "Prior Disease" (columns 4,7,10), but I don't want to display the columns (4-6) associated with the missing values for the "PRIOR Disease" variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;If I don't use the missing option in proc tabulate, then the "&lt;SPAN style="color: #ff0000; font-size: 13.3333330154419px;"&gt;Unknown Disease" &lt;/SPAN&gt;(columns 6-8) don't print, which is what I want, but my totals in columns 2 and 3 goes down by 6, which I don't want to have happen.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;If I use the missing option in proc tabulate, then the "&lt;SPAN style="color: #ff0000; font-size: 13.3333330154419px;"&gt;Unknown Disease" &lt;/SPAN&gt;(columns 6-8) print, which I don't want, but my overall totals in column 2 and 3 are counted correctly, which I want.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;My code is below the table snippet.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 896px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="border-top: none; border-left: none;" width="64"&gt;1&lt;/TD&gt;&lt;TD align="right" width="64"&gt;2&lt;/TD&gt;&lt;TD align="right" width="64"&gt;3&lt;/TD&gt;&lt;TD align="right" width="64"&gt;4&lt;/TD&gt;&lt;TD align="right" width="64"&gt;5&lt;/TD&gt;&lt;TD align="right" width="64"&gt;6&lt;/TD&gt;&lt;TD align="right" width="64"&gt;7&lt;/TD&gt;&lt;TD align="right" width="64"&gt;8&lt;/TD&gt;&lt;TD align="right" width="64"&gt;9&lt;/TD&gt;&lt;TD align="right" width="64"&gt;10&lt;/TD&gt;&lt;TD align="right" width="64"&gt;11&lt;/TD&gt;&lt;TD align="right" width="64"&gt;12&lt;/TD&gt;&lt;TD align="right" width="64"&gt;13&lt;/TD&gt;&lt;TD align="right" width="64"&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="54" rowspan="3" style="border-bottom: .5pt solid black;" width="64"&gt;Reporting Jurisdiction&lt;/TD&gt;&lt;TD class="xl79" rowspan="3" style="border-bottom: .5pt solid black;" width="64"&gt;Total Cases&lt;/TD&gt;&lt;TD class="xl79" rowspan="3" style="border-bottom: .5pt solid black;" width="64"&gt;Total Tested&lt;/TD&gt;&lt;TD class="xl65" colspan="2" rowspan="2" style="border-bottom: .5pt solid black;" width="128"&gt;Positive&lt;/TD&gt;&lt;TD class="xl83" colspan="3" style="border-right: .5pt solid black; border-left: none;" width="192"&gt;&lt;SPAN style="color: #ff0000;"&gt;Unknown Disease&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl67" colspan="3" style="border-right: .5pt solid black; border-left: none;" width="192"&gt;No Prior Disease&lt;/TD&gt;&lt;TD class="xl67" colspan="3" style="border-right: .5pt solid black; border-left: none;" width="192"&gt;Prior Disease&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl86" height="35" rowspan="2" style="border-bottom: .5pt solid black; border-top: none;" width="64"&gt;&lt;SPAN style="color: #ff0000;"&gt;Tested&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl83" colspan="2" style="border-right: .5pt solid black; border-left: none;" width="128"&gt;&lt;SPAN style="color: #ff0000;"&gt;Positive&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl64" rowspan="2" style="border-bottom: .5pt solid black; border-top: none;" width="64"&gt;Tested&lt;/TD&gt;&lt;TD class="xl67" colspan="2" style="border-right: .5pt solid black; border-left: none;" width="128"&gt;Positive&lt;/TD&gt;&lt;TD class="xl64" rowspan="2" style="border-bottom: .5pt solid black; border-top: none;" width="64"&gt;Tested&lt;/TD&gt;&lt;TD class="xl67" colspan="2" style="border-right: .5pt solid black; border-left: none;" width="128"&gt;Positive&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl76" height="16" style="border-top: none;" width="64"&gt;No.&lt;/TD&gt;&lt;TD class="xl76" style="border-top: none; border-left: none;" width="64"&gt;%&lt;/TD&gt;&lt;TD class="xl88" style="border-top: none; border-left: none;" width="64"&gt;&lt;SPAN style="color: #ff0000;"&gt;No.&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl88" style="border-top: none; border-left: none;" width="64"&gt;&lt;SPAN style="color: #ff0000;"&gt;%&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl76" style="border-top: none; border-left: none;" width="64"&gt;No.&lt;/TD&gt;&lt;TD class="xl76" style="border-top: none; border-left: none;" width="64"&gt;%&lt;/TD&gt;&lt;TD class="xl76" style="border-top: none; border-left: none;" width="64"&gt;No.&lt;/TD&gt;&lt;TD class="xl76" style="border-top: none; border-left: none;" width="64"&gt;%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl82" height="19" style="border-top: none;" width="64"&gt;State&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none;" width="64"&gt;1719&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none; border-left: none;" width="64"&gt;1608&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none; border-left: none;" width="64"&gt;158&lt;/TD&gt;&lt;TD class="xl78" style="border-top: none; border-left: none;" width="64"&gt;9.8&lt;/TD&gt;&lt;TD class="xl89" style="border-top: none; border-left: none;" width="64"&gt;&lt;SPAN style="color: #ff0000;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl89" style="border-top: none; border-left: none;" width="64"&gt;&lt;SPAN style="color: #ff0000;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl90" style="border-top: none; border-left: none;" width="64"&gt;&lt;SPAN style="color: #ff0000;"&gt;0.0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none; border-left: none;" width="64"&gt;1524&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none; border-left: none;" width="64"&gt;145&lt;/TD&gt;&lt;TD class="xl78" style="border-top: none; border-left: none;" width="64"&gt;9.5&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none; border-left: none;" width="64"&gt;78&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none; border-left: none;" width="64"&gt;13&lt;/TD&gt;&lt;TD class="xl78" style="border-top: none; border-left: none;" width="64"&gt;16.7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my proc tabulate code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=table47 format=4.1 missing;&lt;/P&gt;&lt;P&gt; class jurisdic prevdisease;&lt;/P&gt;&lt;P&gt; var inh suscdone cultpos;&lt;/P&gt;&lt;P&gt;table all={label="State"} jurisdic, &lt;/P&gt;&lt;P&gt;cultpos={label="Total Cases"} suscdone={label="Total Tested"}&lt;/P&gt;&lt;P&gt;inh={label="Positive"}*(n pctn&amp;lt;suscdone&amp;gt;*[s=[tagattr='format:##0.0']]) &lt;/P&gt;&lt;P&gt;prevdisease={label=""}*(suscdone={label="Tested"} inh={label="&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Positive&lt;/SPAN&gt;"}*(n pctn&amp;lt;suscdone&amp;gt;*[s=[tagattr='format:##0.0']]))/&lt;/P&gt;&lt;P&gt;box={label='Reporting Jurisdiction' s=[just=l]} indent=4 ;&lt;/P&gt;&lt;P&gt;keylabel n='No.';&lt;/P&gt;&lt;P&gt;keylabel sum=' ';&lt;/P&gt;&lt;P&gt;keylabel PctN='%';&lt;/P&gt;&lt;P&gt;format prevdisease $t47prevdisease.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saul Kanowitz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 17:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-tabulate-How-can-I-include-missing-data-in-counts-but-not/m-p/212219#M14000</guid>
      <dc:creator>saul_kanowitz_cdph_ca_gov</dc:creator>
      <dc:date>2015-06-23T17:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate: How can I include missing data in counts but not print the row or column of the missing value</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-tabulate-How-can-I-include-missing-data-in-counts-but-not/m-p/212220#M14001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may be a case of needing to presummarize the data prior to display. To include var values associated with a class variable the class variable value must appear in the output - missing as it were with that option set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be tempted to try the tabulate code (without style overrides as not needed) to create an output data set.&lt;/P&gt;&lt;P&gt;Then use that as input to a modified code to display the values but drop the records where that variable is missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 19:10:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-tabulate-How-can-I-include-missing-data-in-counts-but-not/m-p/212220#M14001</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-23T19:10:40Z</dc:date>
    </item>
  </channel>
</rss>

