<?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 format perecnt: erase parentheses for negative values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13926#M2099</link>
    <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
when using the percent format sas displays negatives values like this: (0.05%)&lt;BR /&gt;
Instead I would like to have -0.05%.&lt;BR /&gt;
Does anybody know how to do this?&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
Eva</description>
    <pubDate>Mon, 09 Nov 2009 15:32:34 GMT</pubDate>
    <dc:creator>Eva</dc:creator>
    <dc:date>2009-11-09T15:32:34Z</dc:date>
    <item>
      <title>format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13926#M2099</link>
      <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
when using the percent format sas displays negatives values like this: (0.05%)&lt;BR /&gt;
Instead I would like to have -0.05%.&lt;BR /&gt;
Does anybody know how to do this?&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
Eva</description>
      <pubDate>Mon, 09 Nov 2009 15:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13926#M2099</guid>
      <dc:creator>Eva</dc:creator>
      <dc:date>2009-11-09T15:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13927#M2100</link>
      <description>Use the percentnw.d format.  &lt;BR /&gt;
&lt;BR /&gt;
For example &lt;BR /&gt;
 &lt;BR /&gt;
   x = -0.313 ;&lt;BR /&gt;
   format x percentn8.2;&lt;BR /&gt;
&lt;BR /&gt;
results in -31.3%.&lt;BR /&gt;
&lt;BR /&gt;
You must make sure the w.d is wide enough to include the negative sign and the percent.&lt;BR /&gt;
&lt;BR /&gt;
See base documentation for further explanation&lt;BR /&gt;
&lt;BR /&gt;
Linda</description>
      <pubDate>Mon, 09 Nov 2009 15:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13927#M2100</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2009-11-09T15:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13928#M2101</link>
      <description>Dear Linda,&lt;BR /&gt;
&lt;BR /&gt;
unfortunately we still user SAS 9.1 and percentn is only available at SAS 9.2&lt;BR /&gt;
Do you know how to to it wth sas 9.1 ?&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
Eva</description>
      <pubDate>Mon, 09 Nov 2009 15:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13928#M2101</guid>
      <dc:creator>Eva</dc:creator>
      <dc:date>2009-11-09T15:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13929#M2102</link>
      <description>Eva;&lt;BR /&gt;
&lt;BR /&gt;
You could multipy by 100 to get the percent value.  You could then concatenate a % symbol to the percent value or indicate that the column/row of numbers is expressed in percent.  The latter is preferred if there is a column or row of numbers.  To have the % symbol beside each number is distracting and clutters the display, aka, poor data visualization practice.&lt;BR /&gt;
&lt;BR /&gt;
hth,&lt;BR /&gt;
Bill</description>
      <pubDate>Mon, 09 Nov 2009 16:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13929#M2102</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2009-11-09T16:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13930#M2103</link>
      <description>I'm using 9.1.3 and I tested the percentnw.d format.  It seemed to work.  However,  I did have to widen the format to 8.2.&lt;BR /&gt;
&lt;BR /&gt;
My other thought would be to use a picture format in proc format to define the format as follows.&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
picture negpct  low  - &amp;lt; 0 =  '000.00%'  (prefix="-" )&lt;BR /&gt;
                 0 - high =   '000.00%' ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
 length x 8;&lt;BR /&gt;
 format y negpct.;&lt;BR /&gt;
 x = .031;y=x*100;output;&lt;BR /&gt;
 x = -0.435;y=x*100; output;&lt;BR /&gt;
&lt;BR /&gt;
 run;</description>
      <pubDate>Mon, 09 Nov 2009 18:02:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13930#M2103</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2009-11-09T18:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13931#M2104</link>
      <description>Sorry not all went through....&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
picture negpct  low  - &amp;lt; 0 =  '000.00%'  (prefix="-" )&lt;BR /&gt;
                 0 - high =   '000.00%' ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
 length x 8;&lt;BR /&gt;
 format y negpct.;&lt;BR /&gt;
 x = .031;y=x*100;output;&lt;BR /&gt;
 x = -0.435;y=x*100; output;&lt;BR /&gt;
&lt;BR /&gt;
 run;</description>
      <pubDate>Mon, 09 Nov 2009 18:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13931#M2104</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2009-11-09T18:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13932#M2105</link>
      <description>Good grief Not sure how to get this to post....&lt;BR /&gt;
&lt;BR /&gt;
  '000.00%' (prefix = "-")&lt;BR /&gt;
  0 - high = '000.00%' ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
You will have to multiply the number by 100 your self.&lt;BR /&gt;
&lt;BR /&gt;
Hope this posts correctly now.&lt;BR /&gt;
&lt;BR /&gt;
Linda&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: LAP&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: LAP

Message was edited by: LAP</description>
      <pubDate>Mon, 09 Nov 2009 18:04:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13932#M2105</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2009-11-09T18:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13933#M2106</link>
      <description>The topic is discussed here - found on the SAS support website with a SEARCH.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Don't Be a SAS® Dinosaur: Modernizing Programs with Base SAS 9.2 Enhancements&lt;BR /&gt;
Warren Repole Jr., SAS Institute Inc.- Figure 13a.&lt;BR /&gt;
&lt;A href="http://support.sas.com/resources/papers/proceedings09/143-2009.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings09/143-2009.pdf&lt;/A&gt;</description>
      <pubDate>Mon, 09 Nov 2009 18:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13933#M2106</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-09T18:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13934#M2107</link>
      <description>Hi:&lt;BR /&gt;
  When you need to post code to the forum and particularly when your code has &amp;lt; or &amp;gt; symbols or you need the indenting to line up, this posting tells how to make that happen using special formatting commands:&lt;BR /&gt;
 &lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609毙" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609毙&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 09 Nov 2009 18:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13934#M2107</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-11-09T18:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13935#M2108</link>
      <description>Dear Linda,&lt;BR /&gt;
&lt;BR /&gt;
many thanks for your post. It works!&lt;BR /&gt;
Here's your example - I hope it posts correctly:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format;&lt;BR /&gt;
picture negpct  low  - &amp;lt; 0 =  '000.00%'  (prefix="-" )&lt;BR /&gt;
                 0 - high =   '000.00%' ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
 length x 8;&lt;BR /&gt;
 format y negpct.;&lt;BR /&gt;
 x = .031;y=x*100;output;&lt;BR /&gt;
 x = -0.435;y=x*100; output;&lt;BR /&gt;
&lt;BR /&gt;
 run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Best wishes&lt;BR /&gt;
Eva</description>
      <pubDate>Tue, 10 Nov 2009 12:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13935#M2108</guid>
      <dc:creator>Eva</dc:creator>
      <dc:date>2009-11-10T12:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: format perecnt: erase parentheses for negative values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13936#M2109</link>
      <description>Hi!&lt;BR /&gt;
If intend to use picture format you do not have to multiply the value it is in the picture.....&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
picture negpct  &lt;BR /&gt;
  0 - high = '009.999%' (mult=100000)&lt;BR /&gt;
  low - 0 = '009.999%' (prefix='-' mult=100000)&lt;BR /&gt;
  ;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 10 Nov 2009 14:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-perecnt-erase-parentheses-for-negative-values/m-p/13936#M2109</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2009-11-10T14:24:46Z</dc:date>
    </item>
  </channel>
</rss>

