<?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: SAS procedure that counts and averages in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-procedure-that-counts-and-averages/m-p/520211#M3981</link>
    <description>&lt;P&gt;HINT: When you get an error copy the code from the log along with the message and paste that into a code box opened with the forum's {I} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want a data set (for further manipulation) or a report (people read these)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Better is to post a data step representative of your data. Not all versions of SAS can use your data sets natively and it is extra work for use to 1) download, 2) make the set available to code and then test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am assuming that "ppl" means people. Depending on how your actual data is structured that may be very easy or somewhat tricky.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would likely start with something like:&lt;/P&gt;
&lt;P&gt;proc means data=combo n mean;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; class dept;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var salary;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if none of&amp;nbsp;your people appear more than once. If the same person is in more than one department for some reason you'll have to decide how to handle that.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 00:11:31 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-12-11T00:11:31Z</dc:date>
    <item>
      <title>SAS procedure that counts and averages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-procedure-that-counts-and-averages/m-p/520205#M3978</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How could I use a procedure to calculate the average salary and also the number of ppl in each department. The code I have tried&amp;nbsp;gives the following message:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Statement is not valid or it is used out of proper order.&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;Not sure what the problem is. I was trying to use proc means to do this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dataset is attached.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 23:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-procedure-that-counts-and-averages/m-p/520205#M3978</guid>
      <dc:creator>sasnewbie5</dc:creator>
      <dc:date>2018-12-10T23:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS procedure that counts and averages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-procedure-that-counts-and-averages/m-p/520210#M3980</link>
      <description>&lt;P&gt;When you have problems with your code, it might be a great idea to post it, along with the log.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 00:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-procedure-that-counts-and-averages/m-p/520210#M3980</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-11T00:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS procedure that counts and averages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-procedure-that-counts-and-averages/m-p/520211#M3981</link>
      <description>&lt;P&gt;HINT: When you get an error copy the code from the log along with the message and paste that into a code box opened with the forum's {I} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want a data set (for further manipulation) or a report (people read these)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Better is to post a data step representative of your data. Not all versions of SAS can use your data sets natively and it is extra work for use to 1) download, 2) make the set available to code and then test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am assuming that "ppl" means people. Depending on how your actual data is structured that may be very easy or somewhat tricky.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would likely start with something like:&lt;/P&gt;
&lt;P&gt;proc means data=combo n mean;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; class dept;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var salary;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if none of&amp;nbsp;your people appear more than once. If the same person is in more than one department for some reason you'll have to decide how to handle that.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 00:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-procedure-that-counts-and-averages/m-p/520211#M3981</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-11T00:11:31Z</dc:date>
    </item>
  </channel>
</rss>

