<?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 calculate lag date according to different category of a variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/443610#M110996</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;Is it possible to add this text directly as part of the "New post" page? Most posted data is still in the wrong format.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 03:41:35 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-03-08T03:41:35Z</dc:date>
    <item>
      <title>How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432597#M107155</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I am working on a data-set containing multiple row for each studycode. there are other variables namely atc_code and date_of_supply. I want to indicate those studycodes whose consecutive date_of _supply for a specific atc group (several atc_code constitutes a group. e.g: C100BS, C11BD4, C10AA01, C112KN CONSTITUTES ONE ATC GROUP ) is less than say 60 days.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I WANT IT ALL IN A SINGLE FILE. CAN ANYONE HELP ME OUT? SAMPLE XLS IS ATTACHED&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 03:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432597#M107155</guid>
      <dc:creator>strqimr</dc:creator>
      <dc:date>2018-01-31T03:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432600#M107156</link>
      <description>&lt;P&gt;Can you please paste the sample as text here and also a sample of your want.I would like a sample of your wanted output. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 03:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432600#M107156</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-31T03:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432627#M107169</link>
      <description>&lt;P&gt;This code will work, if not try to debug it, there might be some problem with position of retain variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sheet3;
by studycode atc_codes date_of_supply;
run;

data final_extract(drop=date_of_supply1);
set sheet3;
retain date_of_supply1;
by studycode atc_codes;
if first.atc_codes then do;
    diff=0;
    date_of_supply1=date_of_supply;
end;
else do;
    diff=date_of_supply1
    date_of_supply1=date_of_supply;
    if diff ge 60 then output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jan 2018 08:05:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432627#M107169</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-01-31T08:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432819#M107239</link>
      <description>&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &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;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/432819#M107239</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-31T16:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/440708#M110152</link>
      <description>&lt;P&gt;Many Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 00:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/440708#M110152</guid>
      <dc:creator>strqimr</dc:creator>
      <dc:date>2018-02-28T00:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/440720#M110160</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;This whole text should be on the "create post" page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 01:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/440720#M110160</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-02-28T01:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/443610#M110996</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;Is it possible to add this text directly as part of the "New post" page? Most posted data is still in the wrong format.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 03:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/443610#M110996</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-03-08T03:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate lag date according to different category of a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/443787#M111052</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;We'll look into it, especially as we work on our project for creating a more responsive-friendly design.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 15:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-lag-date-according-to-different-category-of-a/m-p/443787#M111052</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-03-08T15:21:04Z</dc:date>
    </item>
  </channel>
</rss>

