<?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 Total per month SAS EG in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634120#M21190</link>
    <description>&lt;P&gt;Hello lads,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'am quite new to SAS EG so the question I will ask might be simple but I can't get it done. My current dataset looks like this (example, because in reality its much bigger):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Location - VehicleType - TotalVehicles - Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; AAA -&amp;nbsp; 06 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 - GGG - 13 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; AAA -&amp;nbsp; 02 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; FFF - 11 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 - GGG -&amp;nbsp; 02 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 - CCC- 11 - 10December2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have the total vehicles that drove on that location &lt;STRONG&gt;per month&lt;/STRONG&gt;. So as an example, I want the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Location - VehicleType - TotalVehicles - Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; AAA-&amp;nbsp; 20 - December2019.&lt;/P&gt;&lt;P&gt;2646 - TTT - 78 - December2019&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; GGG-&amp;nbsp; 230- December2019.&lt;/P&gt;&lt;P&gt;2646 - BBB- 780 - December2019&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; HHH-&amp;nbsp; 20 - December2019.&lt;/P&gt;&lt;P&gt;2646 - NNN- 78 - December2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I actually want the total per month per vehicle type. That means each vehicletype must have just 1 date variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody help me with this? Appreciate it.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2020 07:24:20 GMT</pubDate>
    <dc:creator>AK100</dc:creator>
    <dc:date>2020-03-24T07:24:20Z</dc:date>
    <item>
      <title>Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634120#M21190</link>
      <description>&lt;P&gt;Hello lads,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'am quite new to SAS EG so the question I will ask might be simple but I can't get it done. My current dataset looks like this (example, because in reality its much bigger):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Location - VehicleType - TotalVehicles - Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; AAA -&amp;nbsp; 06 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 - GGG - 13 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; AAA -&amp;nbsp; 02 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; FFF - 11 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 - GGG -&amp;nbsp; 02 - 10December2019.&lt;/P&gt;&lt;P&gt;2646 - CCC- 11 - 10December2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have the total vehicles that drove on that location &lt;STRONG&gt;per month&lt;/STRONG&gt;. So as an example, I want the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Location - VehicleType - TotalVehicles - Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; AAA-&amp;nbsp; 20 - December2019.&lt;/P&gt;&lt;P&gt;2646 - TTT - 78 - December2019&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; GGG-&amp;nbsp; 230- December2019.&lt;/P&gt;&lt;P&gt;2646 - BBB- 780 - December2019&lt;/P&gt;&lt;P&gt;2646 -&amp;nbsp; HHH-&amp;nbsp; 20 - December2019.&lt;/P&gt;&lt;P&gt;2646 - NNN- 78 - December2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I actually want the total per month per vehicle type. That means each vehicletype must have just 1 date variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody help me with this? Appreciate it.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 07:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634120#M21190</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T07:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634156#M21191</link>
      <description>&lt;P&gt;In your expected result, you have&amp;nbsp;&lt;EM&gt;three&lt;/EM&gt; observations for 2646-AAA-December2019. That does not make sense.&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/310659"&gt;@AK100&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello lads,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'am quite new to SAS EG so the question I will ask might be simple but I can't get it done. My current dataset looks like this (example, because in reality its much bigger):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Location - VehicleType - TotalVehicles - Date&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;2646 -&amp;nbsp; AAA -&amp;nbsp; 06 - 10December2019.&lt;/P&gt;
&lt;P&gt;2646 - GGG - 13 - 10December2019.&lt;/P&gt;
&lt;P&gt;2646 -&amp;nbsp; AAA -&amp;nbsp; 02 - 10December2019.&lt;/P&gt;
&lt;P&gt;2646 -&amp;nbsp; FFF - 11 - 10December2019.&lt;/P&gt;
&lt;P&gt;2646 - GGG -&amp;nbsp; 02 - 10December2019.&lt;/P&gt;
&lt;P&gt;2646 - CCC- 11 - 10December2019.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to have the total vehicles that drove on that location &lt;STRONG&gt;per month&lt;/STRONG&gt;. So as an example, I want the following:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Location - VehicleType - TotalVehicles - Date&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;2646 -&amp;nbsp; AAA-&amp;nbsp; 20 - December2019.&lt;/P&gt;
&lt;P&gt;2646 - AAA - 78 - December2019&lt;/P&gt;
&lt;P&gt;2646 -&amp;nbsp; GGG-&amp;nbsp; 230- December2019.&lt;/P&gt;
&lt;P&gt;2646 - BBB- 780 - December2019&lt;/P&gt;
&lt;P&gt;2646 -&amp;nbsp; AAA-&amp;nbsp; 20 - December2019.&lt;/P&gt;
&lt;P&gt;2646 - BBB - 78 - December2019&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I actually want the total per month per vehicle type. That means each vehicletype must have just 1 date variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can somebody help me with this? Appreciate it.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 16:11:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634156#M21191</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-23T16:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634174#M21192</link>
      <description>&lt;P&gt;Is your current date variable character or a SAS date valued numeric with a format to display values in the 10December2019 format?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a SAS date value then you can use a format on the variable to create groups.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SASHELP.STOCKS data set that you likely have available has date for the daily Stock price information like open, high , low and close. &lt;BR /&gt;Since the date is a SAS date value using a DATE7. format to do a monthly summary you could use a YYMM or YYMON format to show a summary for a month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc means data=sashelp.stocks min mean max;
   class stock date;
   format date yymon7.;
   var open close high low;
run;&lt;/PRE&gt;
&lt;P&gt;In SAS you will find that if you date to time values that you want to make sure your variable is the appropriate date, time or datetime value so you can do manipulation and display with the SAS functions, supplied formats or even create your own display formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The groups created by a format will generally work for analysis, reporting or graphing.&lt;/P&gt;
&lt;P&gt;So by changing the format in the above Proc Means code from yymon7 to yyq. I could get a calendar quarterly summary, or using the YEAR format an annual summary.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 14:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634174#M21192</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-24T14:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634352#M21199</link>
      <description>That is indeed true, I've changed it. Thx.</description>
      <pubDate>Tue, 24 Mar 2020 07:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634352#M21199</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T07:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634354#M21200</link>
      <description>&lt;P&gt;The simplest way is just a quick SQL query:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select
  location,
  vehicletype,
  intnx('month',date,0,'b') as date format=yymmd7.,
  sum(totalvehicles) as totalvehicles
from have
group by location, vehicletype, calculated date;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Mar 2020 07:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634354#M21200</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-24T07:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634356#M21201</link>
      <description>This worked fine for me Thank you!!</description>
      <pubDate>Tue, 24 Mar 2020 07:43:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634356#M21201</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T07:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634357#M21202</link>
      <description>I did not understand this method, the method of Kurt seemed a bit more easier. But thank you anyway, appreciate your help.</description>
      <pubDate>Tue, 24 Mar 2020 07:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634357#M21202</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T07:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634361#M21203</link>
      <description>&lt;P&gt;Assuming your desired result should actually look like...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.JPG" style="width: 324px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37283i87713C6D54C0F366/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.JPG" alt="Capture3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...and you want to use the EG query builder and not code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 788px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37284iF4CB0909035C3241/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 609px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37285iD031BA2979DE8B7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634361#M21203</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-24T08:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634371#M21206</link>
      <description>This looks okay, but I dont get your last part of the computed month value. Could you show that? Why do you add ,0.'b' after t.1.date?</description>
      <pubDate>Tue, 24 Mar 2020 08:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634371#M21206</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T08:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634375#M21208</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p10v3sa3i4kfxfn1sovhi5xzxh8n.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;INTNX&lt;/A&gt;&amp;nbsp;function is used to increment date/time/datetime values. 0 means to stay in the same month (no increment), and 'b' means to align the result to the beginning. The way we used the function means that we always get the first day of the month as a result, allowing us to use the "date" variable as a month designator for grouping.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634375#M21208</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-24T08:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634377#M21210</link>
      <description>&lt;P&gt;That's the syntax of the SAS intnx() function documented &lt;A href="https://go.documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p10v3sa3i4kfxfn1sovhi5xzxh8n.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;This is a very powerful SAS function which lets you shift SAS Date values. What I'm doing here: Take a date and align it to the first day of the month the date is in. This way I then can summarize by month as now all dates are aligned to the first of the month.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634377#M21210</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-24T08:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634378#M21211</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay guy's that makes sense, its seems clear. However, I forgot to tell 1 thing. My Totalvehicle column is actually a COUNT of the VehicleType column.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My first intention was to SUM the VehicleType, but thats not possible ofcourse as those are not numbers but just letters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the COUNT VehicleType&amp;nbsp; I'am using give me the same result as the SUM vehicletype you are using&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final step is to calculate percentages so I can say for example: Okay vehicletype X drove past that location 560 times in the month X, that is a percentage of 21% of all the types that drove there that month.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634378#M21211</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T08:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634380#M21213</link>
      <description>&lt;P&gt;If every observation in the source dataset represents ONE vehicle, then a coun(*) would do it instead of the sum.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634380#M21213</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-24T08:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634381#M21214</link>
      <description>&lt;P&gt;Yeah! That's why it's important to take your time and provide representative sample data posted as a SAS Data step and then clearly show how the desired result should look like using the sample data. Such an approach removes a lot of ambiguity. You will have to spend a bit more time asking the initial question but then you'll get better answers faster.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634381#M21214</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-24T08:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634382#M21215</link>
      <description>It represents one measurement, so that means one vehicle type and vehicle can drive past a specific location more that once.</description>
      <pubDate>Tue, 24 Mar 2020 08:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634382#M21215</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T08:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634383#M21216</link>
      <description>&lt;P&gt;Okay Patrick, thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634383#M21216</guid>
      <dc:creator>AK100</dc:creator>
      <dc:date>2020-03-24T08:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Total per month SAS EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634384#M21217</link>
      <description>&lt;P&gt;Then this will do it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Location $ VehicleType $ Date :date9.;
format date yymmddd10.;
datalines;
2646 AAA 10Dec2019
2646 GGG 10Dec2019
2646 AAA 10Dec2019
2646 FFF 10Dec2019
2646 GGG 10Dec2019
2646 CCC 10Dec2019
;

proc sql;
create table want as
select
  location,
  vehicletype,
  intnx('month',date,0,'b') as date format=yymmd7.,
  count(*) as totalvehicles
from have
group by location, vehicletype, calculated date;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Providing the data in a data step with datalines enables everybody to immediately rerun the code for proof or testing.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 08:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Total-per-month-SAS-EG/m-p/634384#M21217</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-24T08:52:04Z</dc:date>
    </item>
  </channel>
</rss>

