<?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: Help with Transpose in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235727#M55131</link>
    <description>&lt;P&gt;&amp;nbsp;Those wouldn't be valid SAS variable names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can apply them as labels though by adding the IDLABEL line to your proc transpose code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;idlabel start_dt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 20 Nov 2015 17:07:02 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-11-20T17:07:02Z</dc:date>
    <item>
      <title>Help with Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235723#M55129</link>
      <description>&lt;P&gt;data have;&lt;/P&gt;
&lt;P&gt;input start_dt mmddyy10. calls 3.;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;10/26/2015 10&lt;/P&gt;
&lt;P&gt;11/02/2015 12&lt;/P&gt;
&lt;P&gt;11/09/2015 10&lt;/P&gt;
&lt;P&gt;11/16/2015 8&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;proc sort data=have;&lt;/P&gt;
&lt;P&gt;by start_dt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc transpose data =have out=want (drop=_name_);&lt;/P&gt;
&lt;P&gt;id start_dt;&lt;/P&gt;
&lt;P&gt;var Calls;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It gives me output as below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;_10_26_2015 _11_02_2015 &amp;nbsp; &amp;nbsp;_11_09_2015 &amp;nbsp; &amp;nbsp;_11_16_2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I want the Output as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10/26/2015 &amp;nbsp; &amp;nbsp; 11/02/2015 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11/09/2015 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11/16/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 16:55:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235723#M55129</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-11-20T16:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235725#M55130</link>
      <description>&lt;P&gt;After transposed, date became variable name, in SAS, variable name is not allowed with digit at the first letter, and '/' is not allowed, but '_ ' is Ok. You could use label in transpose, such as:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc transpose data =have out=want (drop=_name_);&lt;BR /&gt;id start_dt;&lt;BR /&gt;var Calls;&lt;BR /&gt;label _10_26_2015='10/26/2015';&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 17:06:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235725#M55130</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2015-11-20T17:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235727#M55131</link>
      <description>&lt;P&gt;&amp;nbsp;Those wouldn't be valid SAS variable names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can apply them as labels though by adding the IDLABEL line to your proc transpose code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;idlabel start_dt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Nov 2015 17:07:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235727#M55131</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-20T17:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235731#M55132</link>
      <description>&lt;P&gt;That approach generates a real ugly dataset for much use. What will you do with the transposed data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You you are looking for a pretty table appearance then use a report procedure such as Proc Report or tabulate.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 17:25:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235731#M55132</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-20T17:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235751#M55135</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;10/26/2015&lt;/SPAN&gt;" is not a valid SAS variable name. Anyway, that's not what you get with the code you posted. You can use IDLABEL=&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input start_dt mmddyy10. calls 3.;
format start_dt mmddyy10.;
datalines;
10/26/2015 10
11/02/2015 12
11/09/2015 10
11/16/2015 8
;
proc sort data=have;
by start_dt;
run;
 
proc transpose data =have out=want (drop=_name_);
id start_dt;
idlabel start_dt;
var Calls;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Nov 2015 18:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-Transpose/m-p/235751#M55135</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-11-20T18:18:12Z</dc:date>
    </item>
  </channel>
</rss>

