<?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 Create row based on another row in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746882#M234360</link>
    <description>&lt;P&gt;I have a dataset with race and ID:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Race&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Declined to Answer&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alaskan Native&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unknown&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;African American&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Native Hawaiian&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would like for the dataset to have one ID and one race. If the race is 'Unknown' or 'Declined to Answer' I would like to have Race be valued as the the race that is known (White for ID #1 and African American for ID #3). If there are two races valued, I would like the value to be the more uncommon race (Native Hawaiian for ID #4). I would ideally like to have a dataset that looks like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Race&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alaskan Native&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;African American&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Native Hawaiian&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I appreciate any help!!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 20:01:47 GMT</pubDate>
    <dc:creator>mar0000</dc:creator>
    <dc:date>2021-06-09T20:01:47Z</dc:date>
    <item>
      <title>Create row based on another row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746882#M234360</link>
      <description>&lt;P&gt;I have a dataset with race and ID:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Race&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Declined to Answer&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alaskan Native&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unknown&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;African American&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Native Hawaiian&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would like for the dataset to have one ID and one race. If the race is 'Unknown' or 'Declined to Answer' I would like to have Race be valued as the the race that is known (White for ID #1 and African American for ID #3). If there are two races valued, I would like the value to be the more uncommon race (Native Hawaiian for ID #4). I would ideally like to have a dataset that looks like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Race&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alaskan Native&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;African American&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Native Hawaiian&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I appreciate any help!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 20:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746882#M234360</guid>
      <dc:creator>mar0000</dc:creator>
      <dc:date>2021-06-09T20:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create row based on another row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746895#M234371</link>
      <description>1. Recode Unknown/Declined to Answer to a SAS missing value or special missing if you still want to uniquely identify the records.&lt;BR /&gt;2. Use PROC FREQ to create a ranking of the races&lt;BR /&gt;3. Merge the rank data with the actual data - including the rank&lt;BR /&gt;4. Sort your data now by rank from #3, take the first record per ID</description>
      <pubDate>Wed, 09 Jun 2021 20:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746895#M234371</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-09T20:25:14Z</dc:date>
    </item>
    <item>
      <title>Dataset with rows based on other rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746898#M234374</link>
      <description>&lt;P&gt;I have a dataset with race and ID:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Race&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Declined to Answer&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alaskan Native&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unknown&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;African American&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Native Hawaiian&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would like for the dataset to have one ID and one race. If the race is 'Unknown' or 'Declined to Answer' I would like to have Race be valued as the the race that is known (White for ID #1 and African American for ID #3). If there are two races valued, I would like the value to be the more uncommon race (Native Hawaiian for ID #4). I would ideally like to have a dataset that looks like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Race&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alaskan Native&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;African American&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Native Hawaiian&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I appreciate any help!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 20:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746898#M234374</guid>
      <dc:creator>mar0000</dc:creator>
      <dc:date>2021-06-09T20:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset with rows based on other rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746899#M234375</link>
      <description>FYI - I merged your posts as they're identical. If you have a reason for reposting please let us know.</description>
      <pubDate>Wed, 09 Jun 2021 20:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746899#M234375</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-09T20:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create row based on another row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746900#M234376</link>
      <description>&lt;P&gt;Can you provide some example code? This explanation isn't very clear to me. Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 20:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746900#M234376</guid>
      <dc:creator>mar0000</dc:creator>
      <dc:date>2021-06-09T20:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create row based on another row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746905#M234378</link>
      <description>Please clarify - which portion is not clear? What did you try so far and what did you get? Please include any code and log.</description>
      <pubDate>Wed, 09 Jun 2021 21:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746905#M234378</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-09T21:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create row based on another row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746942#M234395</link>
      <description>&lt;P&gt;How do you define "uncommon race"?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 06:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-row-based-on-another-row/m-p/746942#M234395</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-06-10T06:11:31Z</dc:date>
    </item>
  </channel>
</rss>

