<?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: Creating a single variable from multiple variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567998#M159808</link>
    <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1vjttz6nuankzn1gh4z3wgcu0bf.htm&amp;amp;locale=en" target="_self"&gt;COALESCE function&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 17:01:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-06-21T17:01:52Z</dc:date>
    <item>
      <title>Creating a single variable from multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567994#M159805</link>
      <description>&lt;P&gt;I have a data set like this;&lt;/P&gt;&lt;P&gt;id&amp;nbsp; k_race p_race b_race&lt;/P&gt;&lt;P&gt;1&amp;nbsp; black&lt;/P&gt;&lt;P&gt;&amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;white&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;asian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want this to be like&amp;nbsp;&lt;/P&gt;&lt;P&gt;id race&lt;/P&gt;&lt;P&gt;1 black&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;2 white&lt;/P&gt;&lt;P&gt;3 asian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do i code this? please help.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 16:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567994#M159805</guid>
      <dc:creator>Dhana18</dc:creator>
      <dc:date>2019-06-21T16:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a single variable from multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567995#M159806</link>
      <description>&lt;P&gt;There are multiple ways to do this but one pretty easy way is:&lt;/P&gt;&lt;PRE&gt;data want(drop = k_race p_race b_race);&lt;BR /&gt;   set have;&lt;BR /&gt;   if k_race ne '' then race = k_race;&lt;BR /&gt;   else if p_race ne '' then race = p_race;&lt;BR /&gt;   else if b_race ne '' then race = b_race;&lt;BR /&gt;   else if k_race = '' and p_race = '' and b_race = '' then race = 'Missing';&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 16:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567995#M159806</guid>
      <dc:creator>alexgouv</dc:creator>
      <dc:date>2019-06-21T16:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a single variable from multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567997#M159807</link>
      <description>PROC TRANSPOSE</description>
      <pubDate>Fri, 21 Jun 2019 16:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567997#M159807</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-21T16:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a single variable from multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567998#M159808</link>
      <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1vjttz6nuankzn1gh4z3wgcu0bf.htm&amp;amp;locale=en" target="_self"&gt;COALESCE function&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 17:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/567998#M159808</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-06-21T17:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a single variable from multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/568006#M159813</link>
      <description>COALESCEC() for character values.</description>
      <pubDate>Fri, 21 Jun 2019 17:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-single-variable-from-multiple-variables/m-p/568006#M159813</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-21T17:30:14Z</dc:date>
    </item>
  </channel>
</rss>

