<?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: How to summarize data by month in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-summarize-data-by-month/m-p/56019#M5870</link>
    <description>Thank you Linus.  That did both help and work.  I was so puzzled by Enterprise Guide and SQL that I overlooked the obvious SAS function I knew I wanted.</description>
    <pubDate>Wed, 22 Oct 2008 20:36:18 GMT</pubDate>
    <dc:creator>JenHarper</dc:creator>
    <dc:date>2008-10-22T20:36:18Z</dc:date>
    <item>
      <title>How to summarize data by month</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-summarize-data-by-month/m-p/56017#M5868</link>
      <description>I'm a programmer trying to convert to EG for some projects where I start with reasonably clean data.  In this case, I have patient level data that I want to summarize and report by facility and month.&lt;BR /&gt;
&lt;BR /&gt;
I've got a query that pulls the variables I want and calculates 2 new columns.  I include fac_id (facility) and disdate (discharge date) under "select data" and selected them as Summary groups.  However, my selected table only reformats the discharge date to monyy5.  Basically I want the format applied at the group-by line so that I only have&lt;BR /&gt;
&lt;BR /&gt;
What do I need to do?  Is it possible to summarize by month at this step or do I have to add another task to do this? (below is my generated SQL)&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
 CREATE TABLE WORK.Query1_for_analysis200808 AS SELECT analysis200808.fac_id,&lt;BR /&gt;
	 analysis200808.DISDATE FORMAT=MONYY5.0 label="Discharge Month",&lt;BR /&gt;
	 (MEAN(analysis200808.Nurse_Courtesy ,&lt;BR /&gt;
	analysis200808.Nurse_CallButton ,&lt;BR /&gt;
	analysis200808.Nurse_Attitude ,&lt;BR /&gt;
	analysis200808.Nurse_Attention ,&lt;BR /&gt;
	analysis200808.Nurse_KeptInformed ,&lt;BR /&gt;
	analysis200808.Nurse_Skill )) FORMAT=5.2 label="Nursing Section Score" AS Nurse_section,&lt;BR /&gt;
	 (MEAN(analysis200808.Doc_TimeSpent ,&lt;BR /&gt;
	analysis200808.Doc_ConcernQuest ,&lt;BR /&gt;
	analysis200808.Doc_KeptInformed ,&lt;BR /&gt;
	analysis200808.Doc_Courtesy ,&lt;BR /&gt;
	analysis200808.Doc_Skill )) FORMAT=5.2 label="Physician Section Score" AS Doc_section,&lt;BR /&gt;
	 analysis200808.Overall_Likelihood FORMAT=5.2 label="Overall Likelihood to Recommend" &lt;BR /&gt;
 FROM EC100035.ANALYSIS200808 AS analysis200808&lt;BR /&gt;
 WHERE analysis200808.type = "E"&lt;BR /&gt;
 GROUP BY analysis200808.fac_id, analysis200808.DISDATE;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 21 Oct 2008 21:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-summarize-data-by-month/m-p/56017#M5868</guid>
      <dc:creator>JenHarper</dc:creator>
      <dc:date>2008-10-21T21:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to summarize data by month</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-summarize-data-by-month/m-p/56018#M5869</link>
      <description>Hi,&lt;BR /&gt;
I'm sitting on a swedish version of EG, so I'm not sure of the exact names of menu choices etc in english. But here we go. I assume that you user "filter and query". &lt;BR /&gt;
&lt;BR /&gt;
First remove DISDATE from "Select data".&lt;BR /&gt;
Then create a calculated column by using put(analysis200808.DISDATE,MONYY5.) as expression. Add it to "select data".&lt;BR /&gt;
Then select the "Edit groups" button, and select your newly calculated column.&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps/works.&lt;BR /&gt;
&lt;BR /&gt;
Linus</description>
      <pubDate>Wed, 22 Oct 2008 09:24:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-summarize-data-by-month/m-p/56018#M5869</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-10-22T09:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to summarize data by month</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-summarize-data-by-month/m-p/56019#M5870</link>
      <description>Thank you Linus.  That did both help and work.  I was so puzzled by Enterprise Guide and SQL that I overlooked the obvious SAS function I knew I wanted.</description>
      <pubDate>Wed, 22 Oct 2008 20:36:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-summarize-data-by-month/m-p/56019#M5870</guid>
      <dc:creator>JenHarper</dc:creator>
      <dc:date>2008-10-22T20:36:18Z</dc:date>
    </item>
  </channel>
</rss>

