<?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: Proc Transpose gives me a stepped table in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270563#M539</link>
    <description>Thank you also for your help!</description>
    <pubDate>Sun, 15 May 2016 03:56:39 GMT</pubDate>
    <dc:creator>deliansteel</dc:creator>
    <dc:date>2016-05-15T03:56:39Z</dc:date>
    <item>
      <title>Proc Transpose gives me a stepped table</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270544#M536</link>
      <description>&lt;P&gt;I proc transposed this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3170iAE1C7F34CA246370/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture3.PNG" title="Capture3.PNG" /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=ngr2 out=ngr1;
by no;
run;

proc transpose data=Ngr1 out=ngr;
	by no;
	id nigeria;
	var _2011 _2012 _2013 _2014 _2015 _2016;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and got this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3168i540421AB9F15CDEC/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" width="686" height="359" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I want something like this&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3169iE7D397E92D882D42/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture2.PNG" title="Capture2.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sat, 14 May 2016 20:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270544#M536</guid>
      <dc:creator>deliansteel</dc:creator>
      <dc:date>2016-05-14T20:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose gives me a stepped table</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270545#M537</link>
      <description>&lt;P&gt;You don't need a BY statement, in fact a 'basic' proc transpose should get you much closer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have out=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Add back portions of code&amp;nbsp;until you get what you need with the minimal amount of code. You should end up with something similar to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have out=want;
id var_name;
var _2011 _2012 _2013 _2014 _2015 _2016;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 14 May 2016 21:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270545#M537</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-14T21:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose gives me a stepped table</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270562#M538</link>
      <description>&lt;P&gt;I assume that variable &lt;STRONG&gt;no&lt;/STRONG&gt; is only there to set a column order in your transposed table. That's fine. But it shouldn't be involved in the transposition. Simply do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=Ngr1 out=ngr name=Year;
	id Nigeria;
	var _2011 - _2016;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 May 2016 03:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270562#M538</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-15T03:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose gives me a stepped table</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270563#M539</link>
      <description>Thank you also for your help!</description>
      <pubDate>Sun, 15 May 2016 03:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270563#M539</guid>
      <dc:creator>deliansteel</dc:creator>
      <dc:date>2016-05-15T03:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose gives me a stepped table</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270564#M540</link>
      <description>Thank you!</description>
      <pubDate>Sun, 15 May 2016 03:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Transpose-gives-me-a-stepped-table/m-p/270564#M540</guid>
      <dc:creator>deliansteel</dc:creator>
      <dc:date>2016-05-15T03:56:51Z</dc:date>
    </item>
  </channel>
</rss>

