<?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: Filling PROC REPORT Analysis Variable with 0% in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675843#M203673</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; Would have loved to see a solution that was specific to the PROC&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You might be able to &lt;FONT face="courier new,courier"&gt;compute&lt;/FONT&gt; something.&amp;nbsp; I like formats &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 08:34:53 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-08-11T08:34:53Z</dc:date>
    <item>
      <title>Filling PROC REPORT Analysis Variable with 0%</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675810#M203652</link>
      <description>&lt;P&gt;I am running PROC REPORT to compute sample counts and percent of total on a cross-tabulation of variables. In parts of the cross-tab I have no representatives for the variables involved. Initially this just printed as a missing value, but I utilized OPTIONS MISSING=0 to fill with 0's. However, since one of the associated columns calculates a percentage, I would rather that it say 0%. I'm not sure how to make this work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=mfb_ly nowd split="*"
		style(report)=[frame=hsides rules=none]
		style(header)=[background=white color=&amp;amp;rgreen. borderbottomcolor=black]
		style(lines)=[background=white];
	where(not missing(mech));
	options missing=0;
	column mech type,(nationalweight nationalweight=pct) ('Overall' nationalweight=tot nationalweight=totpct ) ;
	define mech / group 'Activity' center order=freq descending style(column)=[cellwidth=2.5in just=l] style(header)=[just=l];
	define type / across '';
	define nationalweight / analysis SUM 'n' format=comma8.0 &amp;amp;cl.;
	define pct / analysis PCTSUM format=percent8.1 '%' style(column)=[cellwidth=0.75in just=c];
	define tot / analysis sum 'n' format=comma8.0 &amp;amp;cl.;
	define totpct / analysis pctsum '%' format=percent8.1 order=freq style(column)=[cellwidth=0.75in just=c];
	rbreak after /summarize style(summary)={font_weight=bold};
	compute mech;
    	if _break_ = '_RBREAK_' then mech = 'Total';
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="plot.png" style="width: 791px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48117i6CAB16BD78348C2F/image-size/large?v=v2&amp;amp;px=999" role="button" title="plot.png" alt="plot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 03:29:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675810#M203652</guid>
      <dc:creator>tburus</dc:creator>
      <dc:date>2020-08-11T03:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filling PROC REPORT Analysis Variable with 0%</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675816#M203654</link>
      <description>&lt;P&gt;Maybe create a new format?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
 &amp;nbsp;value pct low-high=[percent8.1]&amp;nbsp; .='0%';&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 04:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675816#M203654</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-08-11T04:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Filling PROC REPORT Analysis Variable with 0%</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675824#M203659</link>
      <description>That did the trick. Thanks. Would have loved to see a solution that was specific to the PROC and didn't require creating a new coded item, but I couldn't find one (if one even exists).</description>
      <pubDate>Tue, 11 Aug 2020 06:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675824#M203659</guid>
      <dc:creator>tburus</dc:creator>
      <dc:date>2020-08-11T06:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filling PROC REPORT Analysis Variable with 0%</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675843#M203673</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; Would have loved to see a solution that was specific to the PROC&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You might be able to &lt;FONT face="courier new,courier"&gt;compute&lt;/FONT&gt; something.&amp;nbsp; I like formats &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 08:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-PROC-REPORT-Analysis-Variable-with-0/m-p/675843#M203673</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-08-11T08:34:53Z</dc:date>
    </item>
  </channel>
</rss>

