<?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: Reshape wide tables to long tables in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reshape-wide-tables-to-long-tables/m-p/368195#M24097</link>
    <description>&lt;P&gt;You can use Proc TRANSPOSE to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use BY statement for your id vars and the VAR statement for the vars to you want to transpose.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2017 08:21:05 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2017-06-19T08:21:05Z</dc:date>
    <item>
      <title>Reshape wide tables to long tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reshape-wide-tables-to-long-tables/m-p/368190#M24095</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input ID1 ID2 $ Value1 Value2;
  cards;
1 A 2 3
2 A 4 5
;
run;

data want;
  input ID1 ID2 $ Type $ Value;
  cards;
1 A Value1 2
1 A Value2 3
2 A Value1 4
2 A Value2 5
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Basically keep ID1 and ID2, and then reshape column 3 and column 4.&lt;/P&gt;&lt;P&gt;How to achieve it? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 08:10:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reshape-wide-tables-to-long-tables/m-p/368190#M24095</guid>
      <dc:creator>ayin</dc:creator>
      <dc:date>2017-06-19T08:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape wide tables to long tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reshape-wide-tables-to-long-tables/m-p/368195#M24097</link>
      <description>&lt;P&gt;You can use Proc TRANSPOSE to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use BY statement for your id vars and the VAR statement for the vars to you want to transpose.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 08:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reshape-wide-tables-to-long-tables/m-p/368195#M24097</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-06-19T08:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape wide tables to long tables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reshape-wide-tables-to-long-tables/m-p/368230#M24102</link>
      <description>&lt;P&gt;As Bruno says you need Proc Transpose for this but you'll also want to do some renaming e.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc transpose data=have out=want(rename=(_name_=type col1=value));
by id1 id2;
var value1 value2;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Jun 2017 10:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reshape-wide-tables-to-long-tables/m-p/368230#M24102</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-06-19T10:40:03Z</dc:date>
    </item>
  </channel>
</rss>

