<?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 Using two different formats for proc tabulate results in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-two-different-formats-for-proc-tabulate-results/m-p/914891#M360534</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any advice on how I can get my proc tabulate to use the formats I assigned in the code? I have tried a few different things and have been unsuccessful. I would like my count column to use format comma10.0. and my cost column to use format dollar12.. Thank you!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data My_data;
 set Data;
 format count comma10.0 cost dollar12.;
 run;

Proc tabulate data=My_data;
class type Year /order=data ;
var cost count;
table type='Type'*Year="SFY",cost="Cost" count="Count" /printmiss
rts=32 ; 
format count comma10.0 cost dollar12.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Feb 2024 17:05:07 GMT</pubDate>
    <dc:creator>Whitlea</dc:creator>
    <dc:date>2024-02-07T17:05:07Z</dc:date>
    <item>
      <title>Using two different formats for proc tabulate results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-two-different-formats-for-proc-tabulate-results/m-p/914891#M360534</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any advice on how I can get my proc tabulate to use the formats I assigned in the code? I have tried a few different things and have been unsuccessful. I would like my count column to use format comma10.0. and my cost column to use format dollar12.. Thank you!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data My_data;
 set Data;
 format count comma10.0 cost dollar12.;
 run;

Proc tabulate data=My_data;
class type Year /order=data ;
var cost count;
table type='Type'*Year="SFY",cost="Cost" count="Count" /printmiss
rts=32 ; 
format count comma10.0 cost dollar12.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2024 17:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-two-different-formats-for-proc-tabulate-results/m-p/914891#M360534</guid>
      <dc:creator>Whitlea</dc:creator>
      <dc:date>2024-02-07T17:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using two different formats for proc tabulate results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-two-different-formats-for-proc-tabulate-results/m-p/914892#M360535</link>
      <description>&lt;P&gt;You should be able to set the formats in the TABLE statement itself, just use *F=.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=sashelp.class;
  class sex;
  var age height ;
  table sex,age*sum*f=10. height*mean*f=5.2 ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2024 17:12:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-two-different-formats-for-proc-tabulate-results/m-p/914892#M360535</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-02-07T17:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using two different formats for proc tabulate results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-two-different-formats-for-proc-tabulate-results/m-p/914894#M360536</link>
      <description>This worked! Thank you!</description>
      <pubDate>Wed, 07 Feb 2024 17:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-two-different-formats-for-proc-tabulate-results/m-p/914894#M360536</guid>
      <dc:creator>Whitlea</dc:creator>
      <dc:date>2024-02-07T17:29:24Z</dc:date>
    </item>
  </channel>
</rss>

