<?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 Picking largest value from two variables to create a third in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Picking-largest-value-from-two-variables-to-create-a-third/m-p/545200#M33293</link>
    <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two variables on income, and I would like to choose whatever the biggest value is to put in a third one. However, in certain cases they will be the same so I need to let SAS know that in this case it can choose either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;

  input id $ Var1 Var2 Var3  ;

cards;

a1 15000 20000 20000

a2 30000 5000 30000

a3 10000 10000 1000

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any help would be welcome&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2019 12:41:22 GMT</pubDate>
    <dc:creator>Sean_OConnor</dc:creator>
    <dc:date>2019-03-22T12:41:22Z</dc:date>
    <item>
      <title>Picking largest value from two variables to create a third</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Picking-largest-value-from-two-variables-to-create-a-third/m-p/545200#M33293</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two variables on income, and I would like to choose whatever the biggest value is to put in a third one. However, in certain cases they will be the same so I need to let SAS know that in this case it can choose either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;

  input id $ Var1 Var2 Var3  ;

cards;

a1 15000 20000 20000

a2 30000 5000 30000

a3 10000 10000 1000

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any help would be welcome&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 12:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Picking-largest-value-from-two-variables-to-create-a-third/m-p/545200#M33293</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2019-03-22T12:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Picking largest value from two variables to create a third</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Picking-largest-value-from-two-variables-to-create-a-third/m-p/545201#M33294</link>
      <description>&lt;P&gt;Max() function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var3 = max(var1,var2);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Mar 2019 12:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Picking-largest-value-from-two-variables-to-create-a-third/m-p/545201#M33294</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-22T12:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Picking largest value from two variables to create a third</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Picking-largest-value-from-two-variables-to-create-a-third/m-p/545205#M33295</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have ;

  input id $ Var1 Var2   ;

cards;
a1 15000 20000 20000
a2 30000 5000 30000
a3 10000 10000 1000
;
run;

data want;
set have;
var3=largest(1,var1,var2);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Mar 2019 12:54:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Picking-largest-value-from-two-variables-to-create-a-third/m-p/545205#M33295</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-03-22T12:54:55Z</dc:date>
    </item>
  </channel>
</rss>

