<?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: SAS EG: Numeric Format add positive (+) sign to values in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406729#M26116</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32246"&gt;@ChrisBrooks&lt;/a&gt;&amp;nbsp;May I ask how you know to use 0= '9' to signify 0 (or is it no change in this instance)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found additional documentation explaining that this is a digit selector. However, the value that I am using the format on is a computed column with coalesce expression. In this case, when I change the&amp;nbsp;&lt;SPAN&gt;0= '9.9', I do not return a 0.0. My data set displays it as '0' anyways. Do you know how to get around that? I have tried changing the expression to coalesce(t1.field_name,0.0). Still the formatting does not make a difference when the field is 0.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Oct 2017 20:31:10 GMT</pubDate>
    <dc:creator>Cat_Collector</dc:creator>
    <dc:date>2017-10-23T20:31:10Z</dc:date>
    <item>
      <title>SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406513#M26105</link>
      <description>&lt;P&gt;Currently, my data set is returned negative and positive values. The negative values display as follows: -1, -10, -11, etc. Meanwhile the positive values are bare: 1, 3, 4, etc. I would like the positive values to display with the positive sign before the value: +1, +3, +4, etc. Is there a way to create this formatting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 13:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406513#M26105</guid>
      <dc:creator>Cat_Collector</dc:creator>
      <dc:date>2017-10-23T13:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406556#M26108</link>
      <description>&lt;PRE&gt;

proc format;
picture fmt
0&amp;lt;-high='00000'( prefix='+');
run;

data x;
input x;
format x fmt.;
cards;
-1
-2
4
7
;
run;
&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Oct 2017 14:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406556#M26108</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-10-23T14:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406559#M26110</link>
      <description>&lt;P&gt;You'll need to create your own picture format e.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	picture signed
	low - &amp;lt; 0 = '00000.0'(prefix='-')
	0 = '9'
	0 &amp;lt; - high = '00000.0' (prefix='+');
run;

data _null_;
	format x y z signed.;
	x=-33.4;
	y=0;
	z=3;
	put x= y= z=;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The number of zeros in the format statement should be increased if you need larger numbers to accommodate their width - and the 9 against the number 0 indicates you want a zero rather than a missing value.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 14:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406559#M26110</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-10-23T14:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406574#M26112</link>
      <description>&lt;P&gt;I have created a program with the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	picture signed
	low &lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;0&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'00000.0'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;prefix&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'-'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'9'&lt;/SPAN&gt;
	&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt; high &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'00000.0'&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;prefix&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'+'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I implement the format to my data sets?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 14:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406574#M26112</guid>
      <dc:creator>Cat_Collector</dc:creator>
      <dc:date>2017-10-23T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406575#M26113</link>
      <description>&lt;P&gt;This paper tells you how to save formats to a permanent catalog and make them available for use in your data sets&amp;nbsp;&lt;A href="http://support.sas.com/resources/papers/proceedings12/048-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/048-2012.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 14:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406575#M26113</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-10-23T14:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406729#M26116</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32246"&gt;@ChrisBrooks&lt;/a&gt;&amp;nbsp;May I ask how you know to use 0= '9' to signify 0 (or is it no change in this instance)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found additional documentation explaining that this is a digit selector. However, the value that I am using the format on is a computed column with coalesce expression. In this case, when I change the&amp;nbsp;&lt;SPAN&gt;0= '9.9', I do not return a 0.0. My data set displays it as '0' anyways. Do you know how to get around that? I have tried changing the expression to coalesce(t1.field_name,0.0). Still the formatting does not make a difference when the field is 0.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 20:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406729#M26116</guid>
      <dc:creator>Cat_Collector</dc:creator>
      <dc:date>2017-10-23T20:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406764#M26117</link>
      <description>&lt;P&gt;I must confess I'm not sure what you mean when you say that you're formatting a "computed column" - can you give the relevant code and data so I can see exactly what it is you're trying to do?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 23:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/406764#M26117</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-10-23T23:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/407039#M26125</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173248"&gt;@Cat_Collector&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32246"&gt;@ChrisBrooks&lt;/a&gt;&amp;nbsp;May I ask how you know to use 0= '9' to signify 0 (or is it no change in this instance)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found additional documentation explaining that this is a digit selector. However, the value that I am using the format on is a computed column with coalesce expression. In this case, when I change the&amp;nbsp;&lt;SPAN&gt;0= '9.9', I do not return a 0.0. My data set displays it as '0' anyways. Do you know how to get around that? I have tried changing the expression to coalesce(t1.field_name,0.0). Still the formatting does not make a difference when the field is 0.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This sounds like you are creating a new variable but not applying the format to result. SAS will default to using a Best format if you do not explicitly assign a format. Which will display 0 as 0 with no decimals by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or show the code of what you are doing with input example data.&lt;/P&gt;
&lt;P&gt;Since your initial format named signed was defined with no actual digit selectors no value other than 0 would actually display it is very hard to determine which elements you are changing, what values you using for input, what you do to them&amp;nbsp;and what you actually expect for a result.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 19:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/407039#M26125</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-24T19:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/409443#M26244</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32246"&gt;@ChrisBrooks&lt;/a&gt;&amp;nbsp;Sorry for the delay in response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;, you are correct in saying that we have created a new variable/computed column. It's actually a metric that adds multiple fields. However, the fields/columns used in the calculation are have null records. So, to get the computed record to calculate properly, we added coalesce in the expression like such:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(COALESCE(t4.COUNT_of_something1)+COALESCE(t2.COUNT_of_something2,0)+COALESCE(t1.COUNT_of_something3,0))-COALESCE(t3.Goal,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result of this newly created variable/column are integers (negative, 0, and positive values). We wanted to format the result to display with a positive sign when the value is positive: +3, +7, etc..&amp;nbsp;I ran the&amp;nbsp;code provided in a program and then added the format to the&amp;nbsp;newly created metric&amp;nbsp;in the project:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="  language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames" style="color: navy; line-height: 1.2; font-weight: bold; box-sizing: inherit;"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames" style="color: navy; line-height: 1.2; font-weight: bold; box-sizing: inherit;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	picture signed
	low &lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;0&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string" style="color: maroon; line-height: 1.2; box-sizing: inherit;"&gt;'00000.0'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;prefix&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string" style="color: maroon; line-height: 1.2; box-sizing: inherit;"&gt;'-'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string" style="color: maroon; line-height: 1.2; box-sizing: inherit;"&gt;'9'&lt;/SPAN&gt;
	&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt; high &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string" style="color: maroon; line-height: 1.2; box-sizing: inherit;"&gt;'00000.0'&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;prefix&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string" style="color: maroon; line-height: 1.2; box-sizing: inherit;"&gt;'+'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames" style="color: navy; line-height: 1.2; font-weight: bold; box-sizing: inherit;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS Add Format.JPG" style="width: 420px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16366i4D1D1C8BAB056B40/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS Add Format.JPG" alt="SAS Add Format.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The computed metric ('Diff') mostly appears fine with the exception when the value is 0. I was hoping it would display as '0.0' like positive and negative values. I assumed the decimal places were added using this portion of the code: 0 = '9'. So, I played around with making it '9.9' and '0.0' but the new variable still displays zero as '0' without a decimal place. Would you all happen to know whether I can fix this? Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS Formating 0.JPG" style="width: 368px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16365iDECBE611ED3922FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS Formating 0.JPG" alt="SAS Formating 0.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 12:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/409443#M26244</guid>
      <dc:creator>Cat_Collector</dc:creator>
      <dc:date>2017-11-01T12:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG: Numeric Format add positive (+) sign to values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/409475#M26245</link>
      <description>&lt;PRE&gt; proc format;
	picture signed
	low - &amp;lt; 0 = '00000.0'(prefix='-')
	0 = '0.0' (noedit)
	0 &amp;lt; - high = '00000.0' (prefix='+')
   ;
run;&lt;/PRE&gt;
&lt;P&gt;The NOEDIT option means display text as written, not as digit selectors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your values are integers why do you care about showing a trailing 0? And if the values are not integers you are not going to get your expected display for values like 0.1&amp;nbsp; with that format.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 14:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/409475#M26245</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-01T14:20:46Z</dc:date>
    </item>
  </channel>
</rss>

