<?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: Question about how to aggregate record data to daily level in Base SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452865#M114333</link>
    <description>&lt;P&gt;Do you have a SAS ETS license? If so, PROC TIMESERIES is what you're looking for.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you mean by SAS 'Enterprise', are you referring to SAS Enterprise Guide? If so, are you using SAS Studio or SAS Base and are programming? SAS Studio has it's own set of tasks, though they differ from EG the concept is the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/203915"&gt;@mkt_apprentice&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi SAS community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a large data set with records of walking activity.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Indvl ID&amp;nbsp; Date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Walk distance (miles)&lt;/P&gt;
&lt;P&gt;01&amp;nbsp; 000001&amp;nbsp; 20000101 &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;02&amp;nbsp; 000001&amp;nbsp; 20000102 &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;03&amp;nbsp; 000001&amp;nbsp; 20000103 &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;04&amp;nbsp; 000001&amp;nbsp; 20000104 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;31&amp;nbsp; 000001&amp;nbsp; 20000131 &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;32&amp;nbsp; 000002&amp;nbsp; 20000101 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;33&amp;nbsp; 000002&amp;nbsp; 20000102 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;34&amp;nbsp; 000002&amp;nbsp; 20000103 &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;35&amp;nbsp; 000002&amp;nbsp; 20000104 &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to aggregate these records into&amp;nbsp;monthly level using base SAS. How could I do that without using SAS Enterprise?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Apr 2018 15:23:27 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-04-10T15:23:27Z</dc:date>
    <item>
      <title>Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452864#M114332</link>
      <description>&lt;P&gt;Hi SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large data set with records of walking activity.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Indvl ID&amp;nbsp; Date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Walk distance (miles)&lt;/P&gt;&lt;P&gt;01&amp;nbsp; 000001&amp;nbsp; 20000101 &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;02&amp;nbsp; 000001&amp;nbsp; 20000102 &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;03&amp;nbsp; 000001&amp;nbsp; 20000103 &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;04&amp;nbsp; 000001&amp;nbsp; 20000104 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;31&amp;nbsp; 000001&amp;nbsp; 20000131 &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;32&amp;nbsp; 000002&amp;nbsp; 20000101 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;33&amp;nbsp; 000002&amp;nbsp; 20000102 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;34&amp;nbsp; 000002&amp;nbsp; 20000103 &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;35&amp;nbsp; 000002&amp;nbsp; 20000104 &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to aggregate these records into&amp;nbsp;monthly level using base SAS. How could I do that without using SAS Enterprise?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452864#M114332</guid>
      <dc:creator>mkt_apprentice</dc:creator>
      <dc:date>2018-04-10T15:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452865#M114333</link>
      <description>&lt;P&gt;Do you have a SAS ETS license? If so, PROC TIMESERIES is what you're looking for.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you mean by SAS 'Enterprise', are you referring to SAS Enterprise Guide? If so, are you using SAS Studio or SAS Base and are programming? SAS Studio has it's own set of tasks, though they differ from EG the concept is the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/203915"&gt;@mkt_apprentice&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi SAS community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a large data set with records of walking activity.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Indvl ID&amp;nbsp; Date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Walk distance (miles)&lt;/P&gt;
&lt;P&gt;01&amp;nbsp; 000001&amp;nbsp; 20000101 &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;02&amp;nbsp; 000001&amp;nbsp; 20000102 &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;03&amp;nbsp; 000001&amp;nbsp; 20000103 &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;04&amp;nbsp; 000001&amp;nbsp; 20000104 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;31&amp;nbsp; 000001&amp;nbsp; 20000131 &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;32&amp;nbsp; 000002&amp;nbsp; 20000101 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;33&amp;nbsp; 000002&amp;nbsp; 20000102 &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;34&amp;nbsp; 000002&amp;nbsp; 20000103 &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;35&amp;nbsp; 000002&amp;nbsp; 20000104 &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to aggregate these records into&amp;nbsp;monthly level using base SAS. How could I do that without using SAS Enterprise?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452865#M114333</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-10T15:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452866#M114334</link>
      <description>&lt;P&gt;You can do this in different ways, since you have large dataset then Proc SQL might be efficient way. Select the appropriate group by variables as needed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
create table want as 
select indvl,id,date,SUM(Walk_Distance) as Monthly_Walk
FROM HAVE
GROUP BY ID,DATE;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452866#M114334</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-04-10T15:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452867#M114335</link>
      <description>&lt;P&gt;I have SAS Studio and SAS for Window. I was searching over the internet how to aggregate panel data and some sources mention ways to solve the task using SAS Enterprise Guide. The dataset is a panel data set and has more than just one variable (I only mention one variable - walking distance- here to illustrate my point). How can I know if I have SAS ETS or not? Also can I use SAS proc timeseries for the panel data?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:28:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452867#M114335</guid>
      <dc:creator>mkt_apprentice</dc:creator>
      <dc:date>2018-04-10T15:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452869#M114336</link>
      <description>&lt;P&gt;Just a couple of questions, then the programming will be easy ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is DATE a numeric variable or a character variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If numeric, does the value reflect a SAS date&amp;nbsp;or is it "what you see is what you get"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want a separate aggregation for each ID (per month), or do you want just one summary record combining all IDs for each month?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452869#M114336</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-10T15:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452870#M114337</link>
      <description>&lt;P&gt;What does "aggregate" mean, anyway?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does it mean "sum"? Does it mean "average"? Does it mean that you want to put all of the information into a long wide observation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tell us, we need to know.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452870#M114337</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-10T15:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452875#M114338</link>
      <description>***you will need to convert Date into SAS date format ; ***the New Date variable is called as SAS_Date; ****aggregate by Month; proc means data=yourdata sum nway ; var Walk_distance; class Indvl_ID SAS_Date; format SAS_Date MMYY.; output out=aggr_by_mon sum=walk_dist; run;</description>
      <pubDate>Tue, 10 Apr 2018 16:06:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452875#M114338</guid>
      <dc:creator>fy1</dc:creator>
      <dc:date>2018-04-10T16:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452876#M114339</link>
      <description>Hi,&lt;BR /&gt;  In addition to the other advice you've gotten, there are several other SAS procedures that will summarize data -- PROC MEANS, PROC TABULATE and PROC REPORT, in addition to PROC SQL and finally, you can always summarize or aggregate the data yourself with a DATA step program.&lt;BR /&gt;&lt;BR /&gt;  We cover PROC MEANS in our Programming 1 course. We cover PROC TABULATE and PROC REPORT in our Report Writing 1 course. However, there have been many previous examples posted in the Forum for how to summarize data using those procedures.&lt;BR /&gt;Here are a few previous postings:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/sums-and-counts-by-group/td-p/49055" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/sums-and-counts-by-group/td-p/49055&lt;/A&gt; &lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/td-p/450169" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/td-p/450169&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 10 Apr 2018 16:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452876#M114339</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-04-10T16:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Question about how to aggregate record data to daily level in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452877#M114340</link>
      <description>&lt;P&gt;You can use PROC MEANS to aggregate, see the example here, which combines monthly data to annual data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/0cae5568752959b035516d6ac07a20fb" target="_blank"&gt;https://gist.github.com/statgeek/0cae5568752959b035516d6ac07a20fb&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 16:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-how-to-aggregate-record-data-to-daily-level-in/m-p/452877#M114340</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-10T16:08:34Z</dc:date>
    </item>
  </channel>
</rss>

