<?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: i want to calculate country wise mothly sales in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-calculate-country-wise-mothly-sales/m-p/447725#M112531</link>
    <description>&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Country $ Product_id $ unitPrice Quantity Date :mmddyy10.;
format date mmddyy10.;
cards;
AU  2507 3.32 6 01/12/2017
AU 2510 4.11 7 01/12/2017
AU 2507 3.32 3 05/12/2017
US 2411 5.22 4 04/11/2017
US 2466 3.11 6 06/10/2017
Ge 2658 4.58 7 07/09/2017
Ge 6655 6.32 2 07/09/2017
US 8425 1.23 9 05/08/2017
AU 3512 3.22 10 06/06/2017
;
run;

proc sql;
create table want as
select
  country,
  year(date) as year,
  month(date) as month,
  sum(quantity*unitprice) as sale
from have
group by country, calculated year, calculated month;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Mar 2018 10:50:48 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-03-22T10:50:48Z</dc:date>
    <item>
      <title>i want to calculate country wise mothly sales</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-calculate-country-wise-mothly-sales/m-p/447712#M112527</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;i am new base SAS programming, i want to calculate countrywise monthly sale with base sas or proc sql method.&lt;/P&gt;&lt;P&gt;data as below&lt;/P&gt;&lt;P&gt;this is retail.CSV file.&lt;/P&gt;&lt;P&gt;Country Product_id unitPrice Quantity Date&lt;/P&gt;&lt;P&gt;AU&amp;nbsp; 2507 3.32 6 01/12/2017&lt;/P&gt;&lt;P&gt;AU 2510 4.11 7 01/12/2017&lt;/P&gt;&lt;P&gt;AU 2507 3.32 3 05/12/2017&lt;/P&gt;&lt;P&gt;US 2411 5.22 4 04/11/2017&lt;/P&gt;&lt;P&gt;US 2466 3.11 6 06/10/2017&lt;/P&gt;&lt;P&gt;Ge 2658 4.58 7 07/09/2017&lt;/P&gt;&lt;P&gt;Ge 6655 6.32 2 07/09/2017&lt;/P&gt;&lt;P&gt;US 8425 1.23 9 05/08/2017&lt;/P&gt;&lt;P&gt;AU 3512 3.22 10 06/06/2017&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 10:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-calculate-country-wise-mothly-sales/m-p/447712#M112527</guid>
      <dc:creator>Raavi2507</dc:creator>
      <dc:date>2018-03-22T10:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: i want to calculate country wise mothly sales</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-calculate-country-wise-mothly-sales/m-p/447725#M112531</link>
      <description>&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Country $ Product_id $ unitPrice Quantity Date :mmddyy10.;
format date mmddyy10.;
cards;
AU  2507 3.32 6 01/12/2017
AU 2510 4.11 7 01/12/2017
AU 2507 3.32 3 05/12/2017
US 2411 5.22 4 04/11/2017
US 2466 3.11 6 06/10/2017
Ge 2658 4.58 7 07/09/2017
Ge 6655 6.32 2 07/09/2017
US 8425 1.23 9 05/08/2017
AU 3512 3.22 10 06/06/2017
;
run;

proc sql;
create table want as
select
  country,
  year(date) as year,
  month(date) as month,
  sum(quantity*unitprice) as sale
from have
group by country, calculated year, calculated month;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Mar 2018 10:50:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-calculate-country-wise-mothly-sales/m-p/447725#M112531</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-22T10:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: i want to calculate country wise mothly sales</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-calculate-country-wise-mothly-sales/m-p/448061#M112662</link>
      <description>Thanks for help .. this is very useful&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Mar 2018 06:46:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-calculate-country-wise-mothly-sales/m-p/448061#M112662</guid>
      <dc:creator>Raavi2507</dc:creator>
      <dc:date>2018-03-23T06:46:15Z</dc:date>
    </item>
  </channel>
</rss>

