<?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: How to trend the last two months (difference in percent) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318519#M69798</link>
    <description>Grand salute gamotte.</description>
    <pubDate>Tue, 13 Dec 2016 10:54:12 GMT</pubDate>
    <dc:creator>Badshaah</dc:creator>
    <dc:date>2016-12-13T10:54:12Z</dc:date>
    <item>
      <title>How to trend the last two months (difference in percent)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318491#M69787</link>
      <description>&lt;P&gt;If we have past all month file and , new file with current month then how we calculate the that current month from one file and last month from all month file&lt;BR /&gt;Percent difference&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 08:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318491#M69787</guid>
      <dc:creator>Badshaah</dc:creator>
      <dc:date>2016-12-13T08:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to trend the last two months (difference in percent)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318493#M69789</link>
      <description>&lt;P&gt;Please supply &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;example data in a data step&lt;/A&gt; so we have something to play with.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 08:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318493#M69789</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-12-13T08:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to trend the last two months (difference in percent)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318496#M69791</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data old new;
    infile datalines dlm=",";
    format month x 2.;
    input month x;
    if month=4 then output new;
    else output old;
    datalines;
1,10,
2,5,
3,12,
4,15
;
run;

data want;
    set old new end=a;
    y=lag(x);

    if a then do;
        diff=100*(x-y)/y;
        output;
    end;

	drop y;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Dec 2016 09:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318496#M69791</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2016-12-13T09:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to trend the last two months (difference in percent)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318519#M69798</link>
      <description>Grand salute gamotte.</description>
      <pubDate>Tue, 13 Dec 2016 10:54:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-trend-the-last-two-months-difference-in-percent/m-p/318519#M69798</guid>
      <dc:creator>Badshaah</dc:creator>
      <dc:date>2016-12-13T10:54:12Z</dc:date>
    </item>
  </channel>
</rss>

