<?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, formats in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/proc-tabulate-formats/m-p/604155#M17038</link>
    <description>&lt;P&gt;You can apply the COMMA. format to a sub-range just the same as you have already applied the BEST format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value numb 
    0-10 = "&amp;lt;=10"
    999-HIGH=[comma8.0]
    other = [best7.];
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note you don't have to list the subranges in any particular order.&amp;nbsp; So this one does the low positive number, then the high ones, and then all the others (including numbers in the middle range).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2019 16:14:03 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2019-11-14T16:14:03Z</dc:date>
    <item>
      <title>proc tabulate, formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-tabulate-formats/m-p/604147#M17037</link>
      <description>&lt;DIV&gt;Hello.&amp;nbsp; I'm making a bunch of tables in proc tabulate.&amp;nbsp; I need to use a format that formats all values less than or equal to 10 with &amp;lt;=10 (I'm using the numb. format for this).&amp;nbsp; That works fine.&amp;nbsp; However, I also want values over 999 to have the comma7 format (so I need both formats).&amp;nbsp; This is the code that I am using (see below).&amp;nbsp; How can I get both formats applied?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=top25adults f=comma7.;
&amp;nbsp;&amp;nbsp; class diag1ccs / order=freq;
&amp;nbsp;&amp;nbsp; class female aweekend dispuniform_4cat;
&amp;nbsp;&amp;nbsp; table diag1ccs=' ',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (all='Adults' female=' ' aweekend=' ' dispuniform_4cat=' ') * n=' '*f=numb.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /box='Diagnosis' 
&amp;nbsp;&amp;nbsp; ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;This is what the numb. format looks like:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;value numb 
0-10 = "&amp;lt;=10"
other = [best7.]
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks!&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;run;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Nov 2019 15:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-tabulate-formats/m-p/604147#M17037</guid>
      <dc:creator>hein68</dc:creator>
      <dc:date>2019-11-14T15:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate, formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-tabulate-formats/m-p/604155#M17038</link>
      <description>&lt;P&gt;You can apply the COMMA. format to a sub-range just the same as you have already applied the BEST format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value numb 
    0-10 = "&amp;lt;=10"
    999-HIGH=[comma8.0]
    other = [best7.];
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note you don't have to list the subranges in any particular order.&amp;nbsp; So this one does the low positive number, then the high ones, and then all the others (including numbers in the middle range).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 16:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-tabulate-formats/m-p/604155#M17038</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-11-14T16:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate, formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-tabulate-formats/m-p/604168#M17039</link>
      <description>&lt;P&gt;That worked, thanks very much!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 16:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-tabulate-formats/m-p/604168#M17039</guid>
      <dc:creator>hein68</dc:creator>
      <dc:date>2019-11-14T16:25:06Z</dc:date>
    </item>
  </channel>
</rss>

