<?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: Missing option not working in PROC REPORT in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565380#M75033</link>
    <description>&lt;P&gt;Note that if you reverse the order of the analysis and across variables in your COLUMNS statement you don't have use so many tricks in the PROC REPORT code to get a single line header.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data="&amp;amp;path\test" missing;
where year(date) between 2000 and 2004;

columns StateFIPS statecode CountyFIPS countyname netgen,date ;

define StateFIPS / group ;
define StateCode / group ;
define CountyFIPS / group ;
define CountyName / group ;
define date / Across ' ';
define NetGen / analysis sum ' ';

compute statefips;
  if statefips ^='' then hold1=Statefips;
  else statefips=hold1;
endcomp;
compute statecode;
  if statecode ^='' then hold2=Statecode;
  else statecode=hold2;
endcomp;

format
  statefips $CHAR2.
  countyfips $CHAR3.
  date year4.
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30222iA118646CAD4BED69/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2019 19:56:41 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-06-11T19:56:41Z</dc:date>
    <item>
      <title>Missing option not working in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565346#M75024</link>
      <description>&lt;P&gt;I'm having a problem with missing group values not showing up in proc report. I have data on electricity production from various generating plants that I want to sum by county. Some of the counties do not have a generating plant, so there is missing data for those counties. I have used the missing option in the proc report statement, but the missing counties do not show up in the report output. If I use PROC TABULATE, they do show up, so it's something I'm doing wrong in Report. Here's my code (data attached).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=test missing;
columns ("StateFIPS" StateFIPS) ("StateCode" statecode) ("CountyFIPS" CountyFIPS) ("CountyName" countyname) date,netgen;
define StateFIPS / group '';
define StateCode / group '';
define CountyFIPS / group '';
define CountyName / group '';
define date / Across '';
define NetGen / analysis sum '';

compute statefips;
	if statefips ^='' then hold1=Statefips;
	else statefips=hold1;
endcomp;
compute statecode;
	if statecode ^='' then hold2=Statecode;
	else statecode=hold2;
endcomp;

format 
	statefips $CHAR2.
	countyfips $CHAR3.
	date year4.;
where year(date)&amp;gt;=2000;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 18:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565346#M75024</guid>
      <dc:creator>ebowen</dc:creator>
      <dc:date>2019-06-11T18:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Missing option not working in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565365#M75028</link>
      <description>&lt;P&gt;There aren't any missing values for COUNTY variables in your dataset.&lt;/P&gt;
&lt;PRE&gt;204   proc freq data="&amp;amp;path\test";
205     where year(date) &amp;gt;= 2000;
206     tables CountyFIPS*CountyName / list missing;
207   run;

NOTE: There were 157 observations read from the data set C:\Downloads\test.
      WHERE YEAR(date)&amp;gt;=2000;
&lt;/PRE&gt;
&lt;PRE&gt;The FREQ Procedure

                                                          Cumulative    Cumulative
CountyFIPS    CountyName         Frequency     Percent     Frequency      Percent
----------------------------------------------------------------------------------
013           Bell County               1        0.64             1         0.64
049           Clark County             35       22.29            36        22.93
065           Estill County             5        3.18            41        26.11
089           Greenup County           14        8.92            55        35.03
125           Laurel County            31       19.75            86        54.78
127           Lawrence County          37       23.57           123        78.34
199           Pulaski County           17       10.83           140        89.17
207           Russell County           17       10.83           157       100.00&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jun 2019 19:20:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565365#M75028</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-11T19:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Missing option not working in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565368#M75030</link>
      <description>&lt;P&gt;Aha, now it makes sense. Those observations without generation data also have missing values for the date. So when I subset for those dates greater than 2000, it eliminates the missing counties. &amp;lt;Head slap&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 19:31:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565368#M75030</guid>
      <dc:creator>ebowen</dc:creator>
      <dc:date>2019-06-11T19:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Missing option not working in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565380#M75033</link>
      <description>&lt;P&gt;Note that if you reverse the order of the analysis and across variables in your COLUMNS statement you don't have use so many tricks in the PROC REPORT code to get a single line header.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data="&amp;amp;path\test" missing;
where year(date) between 2000 and 2004;

columns StateFIPS statecode CountyFIPS countyname netgen,date ;

define StateFIPS / group ;
define StateCode / group ;
define CountyFIPS / group ;
define CountyName / group ;
define date / Across ' ';
define NetGen / analysis sum ' ';

compute statefips;
  if statefips ^='' then hold1=Statefips;
  else statefips=hold1;
endcomp;
compute statecode;
  if statecode ^='' then hold2=Statecode;
  else statecode=hold2;
endcomp;

format
  statefips $CHAR2.
  countyfips $CHAR3.
  date year4.
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30222iA118646CAD4BED69/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 19:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-option-not-working-in-PROC-REPORT/m-p/565380#M75033</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-11T19:56:41Z</dc:date>
    </item>
  </channel>
</rss>

