<?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 format doesn't display completely in nested tabulate in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792710#M32672</link>
    <description>Thank you Bruno！I finally figured that it’s because there are 5 and 5.0 in my exdosa1 variable and so like the other ones didn’t display right. The tip is really helpful! Thanks a lot!</description>
    <pubDate>Thu, 27 Jan 2022 00:02:30 GMT</pubDate>
    <dc:creator>orlyz2k</dc:creator>
    <dc:date>2022-01-27T00:02:30Z</dc:date>
    <item>
      <title>proc format doesn't display completely in nested tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792439#M32655</link>
      <description>&lt;P&gt;Hi, I was trying to format a table in proc tabulate. However part of the table didn't show the complete format I wrote in the proc format,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format;
value $dosegroupl (notsorted)
'0.003' = '0.003 mg/kg'
'0.03' = '0.03  mg/kg'
'0.3' = '0.3 mg/kg'
'2.5' = '2.5 mg/kg'
'5.0' = '5.0 mg/kg'
'10.0' = '10.0 mg/kg'
'15.0' = '15.0 mg/kg';
run;

proc tabulate data=bor missing;
format exdosa1 $dosegroupl. bor $resl.;
class mhdiag / order=freq;
class exdosa1 bor / preloadfmt order=data; * preloadfmt forces the specific ordering defined in proc format;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The result display as this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="微信图片_20220126202559.png" style="width: 648px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67834iFB0A64665C902AB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="微信图片_20220126202559.png" alt="微信图片_20220126202559.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Not sure what's the problem is.&lt;/P&gt;&lt;P&gt;Can anyone help me? Many thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 12:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792439#M32655</guid>
      <dc:creator>orlyz2k</dc:creator>
      <dc:date>2022-01-26T12:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc format doesn't display completely in nested tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792448#M32656</link>
      <description>&lt;P&gt;Sorry the webpage auto removed part of the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="微信图片_20220126204250.png" style="width: 423px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67839iC39B09CA36C90F3A/image-size/large?v=v2&amp;amp;px=999" role="button" title="微信图片_20220126204250.png" alt="微信图片_20220126204250.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 12:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792448#M32656</guid>
      <dc:creator>orlyz2k</dc:creator>
      <dc:date>2022-01-26T12:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc format doesn't display completely in nested tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792498#M32659</link>
      <description>&lt;P&gt;Providing proc contents output of the data set bor would certainly help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created some test data and everything is just printed fine, see code below. There might be issues with length or type of variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value $dosegroupl (notsorted)
    '0.003' = '0.003 mg/kg'
    '0.03' = '0.03  mg/kg'
    '0.3' = '0.3 mg/kg'
    '2.5' = '2.5 mg/kg'
    '5.0' = '5.0 mg/kg'
    '10.0' = '10.0 mg/kg'
    '15.0' = '15.0 mg/kg'
  ;
run;

data bor;
  infile cards dlm=",";
  input
    mhdiag : $32.
  ;
  length exdosa1 $ 8;

  do exdosa1 = '0.003','0.03','0.3', '2.5', '5.0', '10.0','15.0';   
    output;
  end;

  cards;
BOR
PR (confirmed)
unconfirmed PR
;

proc tabulate data=bor missing;
  format exdosa1 $dosegroupl.;
  class mhdiag / order=freq;
  class exdosa1 / preloadfmt order=data;

  * preloadfmt forces the specific ordering defined in proc format;
  table mhdiag, exdosa1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jan 2022 15:10:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792498#M32659</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2022-01-26T15:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc format doesn't display completely in nested tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792520#M32662</link>
      <description>&lt;P&gt;It would help to explicitly describe which values are not displaying correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However the values you show in the column heading for Exdosa1 shows that you have values in the data that do not have rules in the format. Clearest example is the multiple appearance of 10 and 15. Which very likely means that you have different values in the data that appear in the table as the same. If the actual value is "10" you did not provide a rule for display so would be shown as 10. If the value is " 10", same no rule plus if that leading "space" is some other non-printable character means the value is different than "10" so gets its own column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An example: The third row of data has a null character, ASCII 255, not a space.&lt;/P&gt;
&lt;PRE&gt;data example;
 input x $5.;
datalines;
10.0
10
&amp;nbsp;10
;

proc format;
value $dosegroupl (notsorted)
'0.003' = '0.003 mg/kg'
'0.03' = '0.03  mg/kg'
'0.3' = '0.3 mg/kg'
'2.5' = '2.5 mg/kg'
'5.0' = '5.0 mg/kg'
'10.0' = '10.0 mg/kg'
'15.0' = '15.0 mg/kg';
run;

proc tabulate data=example;
   class x;
   format x $dosegroupl.;
   table n,x;
run;&lt;/PRE&gt;
&lt;P&gt;I think that you may also want the PRINTMISS option in the table options .&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 16:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792520#M32662</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-26T16:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc format doesn't display completely in nested tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792710#M32672</link>
      <description>Thank you Bruno！I finally figured that it’s because there are 5 and 5.0 in my exdosa1 variable and so like the other ones didn’t display right. The tip is really helpful! Thanks a lot!</description>
      <pubDate>Thu, 27 Jan 2022 00:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792710#M32672</guid>
      <dc:creator>orlyz2k</dc:creator>
      <dc:date>2022-01-27T00:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc format doesn't display completely in nested tabulate</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792711#M32673</link>
      <description>Hi Ballardw, Yeah i did find out it’s because of the different format of 5.0 and 5. I add the rule to proc format and the problem solved! Thanks a lot!</description>
      <pubDate>Thu, 27 Jan 2022 00:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-format-doesn-t-display-completely-in-nested-tabulate/m-p/792711#M32673</guid>
      <dc:creator>orlyz2k</dc:creator>
      <dc:date>2022-01-27T00:06:37Z</dc:date>
    </item>
  </channel>
</rss>

