<?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: Group information in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37466#M9533</link>
    <description>I'm Sorry about the confusion. Data format is DD/MM/YY. In fact week 40 is october 1st, 2nd and 3th&lt;BR /&gt;
&lt;BR /&gt;
I need to summarize by SKU, client per week&lt;BR /&gt;
Tks

Message was edited by: elilika</description>
    <pubDate>Wed, 27 May 2009 22:03:27 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-05-27T22:03:27Z</dc:date>
    <item>
      <title>Group information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37462#M9529</link>
      <description>I have information of selling by date and I've already have the week number for each observation, now I need to consolidate it by week&lt;BR /&gt;
&lt;BR /&gt;
Table content&lt;BR /&gt;
&lt;BR /&gt;
Date.............Client......Sku......Week.....Volume&lt;BR /&gt;
01/10/08.......3010......9999....40.............10&lt;BR /&gt;
02/10/08...... 3010......9999....40.............05&lt;BR /&gt;
03/10/08...... 3010......9999....40.............30&lt;BR /&gt;
&lt;BR /&gt;
01/10/08.......3010......8888....40.............20&lt;BR /&gt;
02/10/08...... 3010......8888....40.............10&lt;BR /&gt;
03/10/08...... 3010......8888....40.............60&lt;BR /&gt;
&lt;BR /&gt;
01/10/08.......4000......5555....40............02&lt;BR /&gt;
02/10/08...... 4000......5555....40............01&lt;BR /&gt;
02/10/08...... 4000......5555....40...........01&lt;BR /&gt;
&lt;BR /&gt;
01/10/08.......4000......3333....40............10&lt;BR /&gt;
02/10/08...... 4000......3333....40............01&lt;BR /&gt;
02/10/08...... 4000......3333....40...........01&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Output expected&lt;BR /&gt;
&lt;BR /&gt;
Client.....Sku.....Week.....Volume&lt;BR /&gt;
3010......9999.....40.........45&lt;BR /&gt;
3010......8888....40..........80&lt;BR /&gt;
4000......5555.....40.......  04&lt;BR /&gt;
4000.....3333......40......   12&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Wed, 27 May 2009 20:22:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37462#M9529</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-27T20:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Group information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37463#M9530</link>
      <description>Investigate using SAS PROC SUMMARY.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 DOC: The SUMMARY Procedure&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146755.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146755.htm&lt;/A&gt;</description>
      <pubDate>Wed, 27 May 2009 20:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37463#M9530</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-27T20:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Group information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37464#M9531</link>
      <description>Hope the following the code helps:&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  create table test2 as &lt;BR /&gt;
  select client, week, sku, sum(volume) as volume&lt;BR /&gt;
  from testdata&lt;BR /&gt;
  group by sku&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=test2;&lt;BR /&gt;
  by sku;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data test2;&lt;BR /&gt;
  set test2;&lt;BR /&gt;
  by sku;&lt;BR /&gt;
  if first.sku;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
~ Sukanya E</description>
      <pubDate>Wed, 27 May 2009 20:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37464#M9531</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-27T20:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Group information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37465#M9532</link>
      <description>Hi:&lt;BR /&gt;
As Scott says, either PROC MEANS or PROC SUMMARY can summarize the data by any combination of CLASS variables. &lt;BR /&gt;
&lt;BR /&gt;
However, I'm confused by the data. I don't understand how Jan 10, Feb 10 and March 10 are all week number 40. Unless the WEEK variable doesn't have any relevance to the actual DATE variable.&lt;BR /&gt;
&lt;BR /&gt;
I may have misinterpreted your starting data and your desired results, but it seems to me as though WEEK is irrelevant in this context and the desired report is actually a summary based on CLIENT and SKU.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 27 May 2009 20:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37465#M9532</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-05-27T20:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Group information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37466#M9533</link>
      <description>I'm Sorry about the confusion. Data format is DD/MM/YY. In fact week 40 is october 1st, 2nd and 3th&lt;BR /&gt;
&lt;BR /&gt;
I need to summarize by SKU, client per week&lt;BR /&gt;
Tks

Message was edited by: elilika</description>
      <pubDate>Wed, 27 May 2009 22:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37466#M9533</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-27T22:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Group information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37467#M9534</link>
      <description>The code provided earlier was summerized by SKU, and the output was what you expected. Let me know if that is not the desired result.&lt;BR /&gt;
&lt;BR /&gt;
~ Sukanya E

Message was edited by: Sukanya</description>
      <pubDate>Wed, 27 May 2009 22:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37467#M9534</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-27T22:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Group information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37468#M9535</link>
      <description>As Scott said, proc SUMMARY does it:&lt;BR /&gt;
&lt;BR /&gt;
[pre]class CLIENT WEEK SKU;&lt;BR /&gt;
var VOLUME;&lt;BR /&gt;
output out=DSOUT sum=;</description>
      <pubDate>Thu, 28 May 2009 02:47:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-information/m-p/37468#M9535</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-05-28T02:47:14Z</dc:date>
    </item>
  </channel>
</rss>

