<?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: format and lable statement in proc means in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933247#M367051</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your solution&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2024 05:38:11 GMT</pubDate>
    <dc:creator>pavank</dc:creator>
    <dc:date>2024-06-21T05:38:11Z</dc:date>
    <item>
      <title>format and lable statement in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933086#M367016</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sales;
    input Region $ Sales;
    datalines;
North 12345
South 67890
East  23456
West  78901
North 34567
South 89012
East  45678
West  12345
;
run;

/* Using PROC MEANS with LABEL and FORMAT */
proc means data=sales mean sum;
    var Sales;
    label Sales = 'Total Sales';
    format Sales comma10.;
    title 'Summary Statistics for Sales';
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How to apply label and format statments in proc means procedure&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 06:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933086#M367016</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2024-06-20T06:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: format and lable statement in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933105#M367023</link>
      <description>&lt;P&gt;You cannot directly edit the format of sum and mean. You need to edit the base template.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data sales;
    input Region $ Sales;
    datalines;
North 12345
South 67890
East  23456
West  78901
North 34567
South 89012
East  45678
West  12345
;
run;
ods path(prepend) work.templat(update);
proc template;
 edit base.summary;
  edit mean;
   format=comma10.;
  end;
  edit sum;
   format=comma10.;
  end;
 end;
run;

proc means data=sales mean sum;
    var Sales;
    label Sales = 'Total Sales';
    title 'Summary Statistics for Sales';
run;


proc template;
 delete base.summary;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jun 2024 09:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933105#M367023</guid>
      <dc:creator>rudfaden</dc:creator>
      <dc:date>2024-06-20T09:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: format and lable statement in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933186#M367034</link>
      <description>&lt;P&gt;Perhaps a different procedure:&lt;/P&gt;
&lt;P&gt;When appearance is an issue look to the report procedures where there are more appearance controls:&lt;/P&gt;
&lt;PRE&gt;proc report data=sales;
   column region sales sales=salessum;
   define region / group;
   define sales/mean format=comma10.2 "Mean Sales";
   define salessum/ sum format=comma10. "Total Sales";
run;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sales;
   class region;
   var sales;
   table region=' ',
         Sales=' '*(mean='Mean Sales'*f=comma10. sum='Total Sales'*f=comma10.)
         /box='Region'
   ;
run;&lt;/PRE&gt;
&lt;P&gt;or create an output set and us proc print.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 14:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933186#M367034</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-06-20T14:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: format and lable statement in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933247#M367051</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your solution&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 05:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-and-lable-statement-in-proc-means/m-p/933247#M367051</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2024-06-21T05:38:11Z</dc:date>
    </item>
  </channel>
</rss>

