<?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: Proc Tabulate  column percentage negative values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-column-percentage-negative-values/m-p/537076#M6727</link>
    <description>Thanks Andreas!</description>
    <pubDate>Wed, 20 Feb 2019 13:23:12 GMT</pubDate>
    <dc:creator>Rohit_R</dc:creator>
    <dc:date>2019-02-20T13:23:12Z</dc:date>
    <item>
      <title>Proc Tabulate  column percentage negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-column-percentage-negative-values/m-p/537040#M6724</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a picture format to display '%' in proc tabulate output. Using this format is however changing the negative values to positive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code I am using.&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;picture mypercent_pict (round) low-high = "009.99%";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc tabulate data=dataset;&lt;BR /&gt;class Month ;&lt;BR /&gt;var Segment Total;&lt;BR /&gt;table Month='', (Total*sum=""*f=comma12. Segment=""*(sum="segment"*f=comma12. pctsum&amp;lt;Total&amp;gt;="Segment as %"*f=mypercent_pic));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I don't use "*f=mypercent_pic" I get the following output:&lt;/P&gt;&lt;P&gt;Month &amp;nbsp; &amp;nbsp; &amp;nbsp; Total&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Segment &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Segment as %&lt;BR /&gt;Jul-18 &amp;nbsp; &amp;nbsp; &amp;nbsp; 689,039 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,194,031 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 173.29&lt;BR /&gt;Aug-18 &amp;nbsp; &amp;nbsp;-353,108 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,409,626 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-399.21&lt;BR /&gt;Sep-18 &amp;nbsp; &amp;nbsp;-886,771 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,144,431 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-129.06&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, using the mypercent_pict format gets rid of the negative sign.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Month &amp;nbsp; &amp;nbsp; &amp;nbsp; Total&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Segment &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Segment as %&lt;BR /&gt;Jul-18 &amp;nbsp; &amp;nbsp; &amp;nbsp; 689,039 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,194,031&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 173.29%&lt;BR /&gt;Aug-18 &amp;nbsp; &amp;nbsp;-353,108 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,409,626&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 399.21%&lt;BR /&gt;Sep-18 &amp;nbsp; &amp;nbsp;-886,771 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,144,431&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 129.06%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions to get the output as -399.21% and -129.06% in the table?&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>Wed, 20 Feb 2019 11:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-column-percentage-negative-values/m-p/537040#M6724</guid>
      <dc:creator>Rohit_R</dc:creator>
      <dc:date>2019-02-20T11:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate  column percentage negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-column-percentage-negative-values/m-p/537058#M6725</link>
      <description>&lt;P&gt;When using picture-formats you have to tell sas that negative numbers need special formatting:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
   picture mypercent_pict (round)
      low -&amp;lt; 0 = "009.99%" (prefix = "-")
      0 - high = "009.99%"
   ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Feb 2019 12:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-column-percentage-negative-values/m-p/537058#M6725</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-02-20T12:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate  column percentage negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-column-percentage-negative-values/m-p/537076#M6727</link>
      <description>Thanks Andreas!</description>
      <pubDate>Wed, 20 Feb 2019 13:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-column-percentage-negative-values/m-p/537076#M6727</guid>
      <dc:creator>Rohit_R</dc:creator>
      <dc:date>2019-02-20T13:23:12Z</dc:date>
    </item>
  </channel>
</rss>

