<?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: How to Apply proc format for Blank numeric values in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294890#M16719</link>
    <description>&lt;P&gt;HI Xia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you suggestion. I have done something similar to &amp;nbsp;that &amp;nbsp;for missing numeric values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA A;&lt;BR /&gt;SET A;&lt;BR /&gt;IF Member_Percent &amp;lt;0 THEN Member_Percent=0;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My program never results in a negative percentage so the above would work for me .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format ;&lt;/P&gt;&lt;P&gt;value zero (default=12) 0='-' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2016 17:15:43 GMT</pubDate>
    <dc:creator>mgorripati</dc:creator>
    <dc:date>2016-08-29T17:15:43Z</dc:date>
    <item>
      <title>How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294673#M16706</link>
      <description>&lt;P&gt;I want to display data using proc report . I have a numeric column with percent8.2 format . When the data is not available to calculate percentages , &amp;nbsp;the column has &lt;STRONG&gt;BALNK&lt;/STRONG&gt;&amp;nbsp;values (I suppose missing numeric supposed to be dot (&lt;FONT size="4"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/FONT&gt;) ) . how do i compate blank numeric values ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to display '-' in place of missing data . I have choosen two approaches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I want to use proc format to apply formating for missing data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;value zero (default=12) 0='-'&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '.'='-';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but, &amp;nbsp;how do i apply format for missing numeric value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) using Options missing='-'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem with the above approach is that i am not able to center the Dash symbol(-) in my excel report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;it appears to the right of the column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i center '-' symol to the center of the excel cell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using excelxp tagests and proc report to generate report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help &amp;nbsp;is highly appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 01:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294673#M16706</guid>
      <dc:creator>mgorripati</dc:creator>
      <dc:date>2016-08-29T01:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294684#M16707</link>
      <description>&lt;PRE&gt;
It is proc report thing. Plz post it at ODS Report forum.
using style=

options missing='-';
................
proc report ..........
column xx/style={just=center};
...............

&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2016 02:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294684#M16707</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-29T02:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294688#M16708</link>
      <description>&lt;P&gt;Hi Xia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume you are talking about using style format in variable DEFINE section of the PROC REPORT &amp;nbsp;OR &amp;nbsp;on the PROC REPORT line ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have two version but none are able to center justify the Dash (-) symbol.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;options missing='-';&lt;/P&gt;&lt;P&gt;PROC REPORT data= DATASET nofs headline headskip missing split='/'&lt;BR /&gt;style(report)=[just=center]&lt;BR /&gt;style(summary)=[color=cx3e3d73 backgroundcolor=cxaeadd9&lt;BR /&gt;fontfamily=helvetica fontsize=3 textalign=c font_weight=bold]&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;style(column)=[just=center];&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;Column Script_Count Member_Percent ;&lt;/P&gt;&lt;P&gt;DEFINE Script_Count / ANALYSIS FORMAT=comma. CENTER 'Script Counts' style ={tagattr="format:###,###,###"};&lt;BR /&gt;EFINE Member_Percent / Analysis CENTER 'Members (%)' &amp;nbsp;;&lt;/P&gt;&lt;P&gt;RUN:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;options missing='-';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;PROC REPORT data= DATASET nofs headline headskip missing split='/'&lt;BR /&gt;style(report)=[just=center]&lt;BR /&gt;style(summary)=[color=cx3e3d73 backgroundcolor=cxaeadd9&lt;BR /&gt;fontfamily=helvetica fontsize=3 textalign=c font_weight=bold];&lt;BR /&gt;Column Script_Count Member_Percent ;&lt;/P&gt;&lt;P&gt;DEFINE Script_Count / ANALYSIS FORMAT=comma. CENTER 'Script Counts' style ={tagattr="format:###,###,###"};&lt;BR /&gt;EFINE Member_Percent / Analysis CENTER 'Members (%)' &amp;nbsp;&lt;STRONG&gt;style(column)={just=center}&amp;nbsp;&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;RUN:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 03:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294688#M16708</guid>
      <dc:creator>mgorripati</dc:creator>
      <dc:date>2016-08-29T03:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294702#M16709</link>
      <description>&lt;P&gt;Proc format;&lt;/P&gt;
&lt;P&gt;value custom_fmt&lt;/P&gt;
&lt;P&gt;0, . = '-'&lt;/P&gt;
&lt;P&gt;other=[percent8.2];&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 06:07:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294702#M16709</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-29T06:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294733#M16710</link>
      <description>&lt;PRE&gt;
Very frustrated . A workaround way is making a new CHARACTER variable.
Another solution is directly modify its html source code.



Proc format;
value custom_fmt
0, . = "-"
other=[percent8.2];
run;
data have;
 set sashelp.class;
 age=age*.01;
 if _n_ in (2:6) then age=.;
 new_age=put(age,custom_fmt10.);
run;
ods escapechar='~';
ods tagsets.excelxp file='/folders/myfolders/xx.xml' style=sasweb;
proc report data=have nowd;
column name sex new_age;
define new_age/display style={just=center};
run;
ods tagsets.excelxp close;

&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2016 09:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294733#M16710</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-29T09:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294736#M16711</link>
      <description>&lt;PRE&gt;

You could make a COMPUTED variable to make a character variable for this:



Proc format;
value custom_fmt
0, . = "-"
other=[percent8.2];
run;
data have;
 set sashelp.class;
 age=age*.01;
 if _n_ in (2:6) then age=.;
run;
ods tagsets.excelxp file='/folders/myfolders/xx.xml' style=sasweb;
proc report data=have nowd;
column name sex age new_age;
define age/analysis noprint;
define new_age/computed style={just=center};
compute new_age/character length=10;
 new_age=put(age.sum,custom_fmt10.);
endcomp;
run;
ods tagsets.excelxp close;

&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2016 09:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294736#M16711</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-29T09:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294890#M16719</link>
      <description>&lt;P&gt;HI Xia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you suggestion. I have done something similar to &amp;nbsp;that &amp;nbsp;for missing numeric values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA A;&lt;BR /&gt;SET A;&lt;BR /&gt;IF Member_Percent &amp;lt;0 THEN Member_Percent=0;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My program never results in a negative percentage so the above would work for me .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format ;&lt;/P&gt;&lt;P&gt;value zero (default=12) 0='-' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/294890#M16719</guid>
      <dc:creator>mgorripati</dc:creator>
      <dc:date>2016-08-29T17:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply proc format for Blank numeric values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/367107#M18820</link>
      <description>&lt;P&gt;Hi&amp;nbsp;firend...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you try&amp;nbsp;with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OPTION MISSING=' '&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It will be set in the beginning of your program.&amp;nbsp;&lt;BR /&gt;it works to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 19:05:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Apply-proc-format-for-Blank-numeric-values/m-p/367107#M18820</guid>
      <dc:creator>jack_CR</dc:creator>
      <dc:date>2017-06-14T19:05:46Z</dc:date>
    </item>
  </channel>
</rss>

