<?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: Using Proc means to get values in desired format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506107#M135606</link>
    <description>&lt;P&gt;For your mean do want the value to actually be an integer or just appear as such? Apply a format such as F5. and the appearance will be rounded to an integer value. Or use a data step and actually round or truncate the value with ROUNT, FLOOR or CEIL functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Oct 2018 18:36:16 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-10-19T18:36:16Z</dc:date>
    <item>
      <title>Using Proc means to get values in desired format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506099#M135602</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get mean, median and P95 using Proc means in a desired format such as mean_pulse as integer and P50&amp;nbsp;and P95&amp;nbsp;&lt;/P&gt;&lt;P&gt;with one decimal. Can some body help me to modify my code to get the desired output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input id  pulse;
cards;
1 2
4 5
7 8
1 3
4 5
7 8
1 2
4 5
7 9
1 2
4 7
7 8
1 5
4 7
7 8
;
run;
 

proc sort data =test; by id; run;

proc means data =test noprint;
var pulse;
by id ;
output out=want (drop= _type_ _freq_) mean=mean_pulse p50=median_pulse p95=pctile_95;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;At present, I am getting median and P95 as whole number but I want with a decimal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506099#M135602</guid>
      <dc:creator>DeepakSwain</dc:creator>
      <dc:date>2018-10-19T18:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc means to get values in desired format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506103#M135604</link>
      <description>&lt;P&gt;Here is one way of doing that :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want2;
    set want;
    format median_pulse pctile_95 10.1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506103#M135604</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2018-10-19T18:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc means to get values in desired format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506107#M135606</link>
      <description>&lt;P&gt;For your mean do want the value to actually be an integer or just appear as such? Apply a format such as F5. and the appearance will be rounded to an integer value. Or use a data step and actually round or truncate the value with ROUNT, FLOOR or CEIL functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:36:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506107#M135606</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-19T18:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc means to get values in desired format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506110#M135608</link>
      <description>Hi pink_poodle,&lt;BR /&gt;Is there a way to put desired format with P50 and P95 in proc means statement.</description>
      <pubDate>Fri, 19 Oct 2018 18:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506110#M135608</guid>
      <dc:creator>DeepakSwain</dc:creator>
      <dc:date>2018-10-19T18:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc means to get values in desired format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506115#M135613</link>
      <description>&lt;P&gt;You can put the format statement in PROC MEANS.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506115#M135613</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-10-19T18:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc means to get values in desired format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506127#M135618</link>
      <description>Hi PaigeMiller,&lt;BR /&gt;&lt;BR /&gt;Great. I am trying to use format statement with proc means. Can you kindly suggest the necessary modification in the above code.&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 19 Oct 2018 19:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506127#M135618</guid>
      <dc:creator>DeepakSwain</dc:creator>
      <dc:date>2018-10-19T19:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using Proc means to get values in desired format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506215#M135663</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc means data =test noprint;
var pulse;
by id ;
output out=want (drop= _type_ _freq_) mean=mean_pulse p50=median_pulse p95=pctile_95;
format _numeric_ 10.1;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Oct 2018 10:33:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Proc-means-to-get-values-in-desired-format/m-p/506215#M135663</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-10-20T10:33:27Z</dc:date>
    </item>
  </channel>
</rss>

