<?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 Growth By Product Per Quarter in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Growth-By-Product-Per-Quarter/m-p/50313#M10490</link>
    <description>HI All,&lt;BR /&gt;
I have the follwing issue:&lt;BR /&gt;
&lt;BR /&gt;
Product..Month.......Sales&lt;BR /&gt;
x.......April.......10&lt;BR /&gt;
y.......April.......5&lt;BR /&gt;
x.......May.......12&lt;BR /&gt;
y.......May.......12&lt;BR /&gt;
x.......June.......15&lt;BR /&gt;
y.......June.......14&lt;BR /&gt;
&lt;BR /&gt;
I would like SAS do the the following:&lt;BR /&gt;
Product.......Growth&lt;BR /&gt;
x.......15-10&lt;BR /&gt;
y.......14-5&lt;BR /&gt;
&lt;BR /&gt;
In fact, for the data I have, i will be calculating yearly growth. And, the date values are all in date format itself.&lt;BR /&gt;
&lt;BR /&gt;
Thaning you in advance,&lt;BR /&gt;
Jijil</description>
    <pubDate>Thu, 14 Apr 2011 03:22:37 GMT</pubDate>
    <dc:creator>JAR</dc:creator>
    <dc:date>2011-04-14T03:22:37Z</dc:date>
    <item>
      <title>Growth By Product Per Quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Growth-By-Product-Per-Quarter/m-p/50313#M10490</link>
      <description>HI All,&lt;BR /&gt;
I have the follwing issue:&lt;BR /&gt;
&lt;BR /&gt;
Product..Month.......Sales&lt;BR /&gt;
x.......April.......10&lt;BR /&gt;
y.......April.......5&lt;BR /&gt;
x.......May.......12&lt;BR /&gt;
y.......May.......12&lt;BR /&gt;
x.......June.......15&lt;BR /&gt;
y.......June.......14&lt;BR /&gt;
&lt;BR /&gt;
I would like SAS do the the following:&lt;BR /&gt;
Product.......Growth&lt;BR /&gt;
x.......15-10&lt;BR /&gt;
y.......14-5&lt;BR /&gt;
&lt;BR /&gt;
In fact, for the data I have, i will be calculating yearly growth. And, the date values are all in date format itself.&lt;BR /&gt;
&lt;BR /&gt;
Thaning you in advance,&lt;BR /&gt;
Jijil</description>
      <pubDate>Thu, 14 Apr 2011 03:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Growth-By-Product-Per-Quarter/m-p/50313#M10490</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2011-04-14T03:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Growth By Product Per Quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Growth-By-Product-Per-Quarter/m-p/50314#M10491</link>
      <description>[pre]&lt;BR /&gt;
data temp;&lt;BR /&gt;
infile datalines dlm='.';&lt;BR /&gt;
 input Product $ Month : date9. Sales ;&lt;BR /&gt;
 format month monname.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
x.......11Apr2009.......10&lt;BR /&gt;
y.......12Apr2009.......5&lt;BR /&gt;
x.......14May2009.......12&lt;BR /&gt;
y.......15May2009.......12&lt;BR /&gt;
x.......16Jun2009.......15&lt;BR /&gt;
y.......17Jun2009.......14&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sort data=temp;&lt;BR /&gt;
 by product month ;&lt;BR /&gt;
run;&lt;BR /&gt;
data want;&lt;BR /&gt;
 set temp;&lt;BR /&gt;
 by product month;&lt;BR /&gt;
 length growth $ 10;&lt;BR /&gt;
 retain start;&lt;BR /&gt;
 if first.product then start=sales;&lt;BR /&gt;
 if last.product then do;&lt;BR /&gt;
                        growth=catx('-',sales,start);&lt;BR /&gt;
                        output;&lt;BR /&gt;
                      end;&lt;BR /&gt;
 keep product growth;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 14 Apr 2011 08:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Growth-By-Product-Per-Quarter/m-p/50314#M10491</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-14T08:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Growth By Product Per Quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Growth-By-Product-Per-Quarter/m-p/50315#M10492</link>
      <description>Dear Ksharp:&lt;BR /&gt;
Thanks a lot for the code.&lt;BR /&gt;
I had instered those dots as this forum does not support tab. Anyway, you code works awesome!&lt;BR /&gt;
&lt;BR /&gt;
Finally, I wanted the actual numerical value instead of 15-10, which is not difficult. &lt;BR /&gt;
&lt;BR /&gt;
Thanks a million!&lt;BR /&gt;
&lt;BR /&gt;
Jijil Ramakrishnan</description>
      <pubDate>Fri, 15 Apr 2011 08:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Growth-By-Product-Per-Quarter/m-p/50315#M10492</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2011-04-15T08:52:21Z</dc:date>
    </item>
  </channel>
</rss>

