<?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: Create variable with multiple conditions in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Create-variable-with-multiple-conditions/m-p/639501#M9028</link>
    <description>&lt;P&gt;Anything involving "different type of sport" is going to involve having a list or format that can assign every value of sport of encountered into a "type" category.&lt;/P&gt;
&lt;P&gt;So you might start with listing all of your sports and what category you want to use for each.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2020 15:39:06 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-04-13T15:39:06Z</dc:date>
    <item>
      <title>Create variable with multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Create-variable-with-multiple-conditions/m-p/639499#M9027</link>
      <description>&lt;PRE&gt;data have;
input Person_ID $   date  Date9.     Sport $ ;
format date date9.;
datalines;
1234 20FEB2020 Football 
1234 20FEB2020 Basketball 
1234 25FEB2020 Ski 
1234 07SEP2020 Football&lt;/PRE&gt;&lt;P&gt;How would I create a variable that says 'Y' for line 1 and 4 because there is at least a 6 month difference between the two days; and 'Y' for line 3 because it is a different type of sport? I want 'N' if it is on the same day and has a different sport, 'Y' if it is on a different day and a different sport, and 'Y' if the same (or different) sport is played with a 6 month difference.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 15:36:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Create-variable-with-multiple-conditions/m-p/639499#M9027</guid>
      <dc:creator>mar0000</dc:creator>
      <dc:date>2020-04-13T15:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create variable with multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Create-variable-with-multiple-conditions/m-p/639501#M9028</link>
      <description>&lt;P&gt;Anything involving "different type of sport" is going to involve having a list or format that can assign every value of sport of encountered into a "type" category.&lt;/P&gt;
&lt;P&gt;So you might start with listing all of your sports and what category you want to use for each.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 15:39:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Create-variable-with-multiple-conditions/m-p/639501#M9028</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-13T15:39:06Z</dc:date>
    </item>
  </channel>
</rss>

