<?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 new Columns based on values from another Column in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Create-new-Columns-based-on-values-from-another-Column/m-p/269632#M18672</link>
    <description>&lt;P&gt;The second part of your question is commonly known as a transpose.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should find an option under Data Tasks to transpose the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But given your description it sounds like you may need to split your file one for REF and one for Reason? Otherwise how do you want it to look, will all the reason variables be empt for the REF records? This is a case where you need to provide sample input and output data.&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2016 04:44:21 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-05-11T04:44:21Z</dc:date>
    <item>
      <title>Create new Columns based on values from another Column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Create-new-Columns-based-on-values-from-another-Column/m-p/269624#M18670</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set called "Complaints".&amp;nbsp; In this dataset are columns called "Ref"&amp;nbsp;and&amp;nbsp;"Reason".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "Ref" is a customers reference number. For each reference number there is a "Reason". This dataset can and does contain duplicate reference numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way that I can create a new dataset and have disctinct "Ref" and create new columns for each "Reason"? Some customers can have 20 different "Reason"s.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Haydn&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 04:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Create-new-Columns-based-on-values-from-another-Column/m-p/269624#M18670</guid>
      <dc:creator>Haydn</dc:creator>
      <dc:date>2016-05-11T04:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create new Columns based on values from another Column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Create-new-Columns-based-on-values-from-another-Column/m-p/269630#M18671</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope I understood your problem correctly. Below I tried to solve it using proc transpose.&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if this work, otherwise provide more information on how your input data looks like.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data complaints;&lt;BR /&gt;input customer $ ref reason $20.;&lt;BR /&gt;datalines;&lt;BR /&gt;C1 101 Not happy&lt;BR /&gt;C1 101 Delayed Service&lt;BR /&gt;C1 102 High Price&lt;BR /&gt;C2 101 Not happy&lt;BR /&gt;C2 101 Delayed Service&lt;BR /&gt;C2 101 Prolong resolution&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc transpose data=complaints out=transposed;&lt;BR /&gt;by customer ref;&lt;BR /&gt;var reason;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 04:40:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Create-new-Columns-based-on-values-from-another-Column/m-p/269630#M18671</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-05-11T04:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create new Columns based on values from another Column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Create-new-Columns-based-on-values-from-another-Column/m-p/269632#M18672</link>
      <description>&lt;P&gt;The second part of your question is commonly known as a transpose.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should find an option under Data Tasks to transpose the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But given your description it sounds like you may need to split your file one for REF and one for Reason? Otherwise how do you want it to look, will all the reason variables be empt for the REF records? This is a case where you need to provide sample input and output data.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 04:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Create-new-Columns-based-on-values-from-another-Column/m-p/269632#M18672</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-11T04:44:21Z</dc:date>
    </item>
  </channel>
</rss>

