<?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: label variables during proc transpose long to wide in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750633#M236141</link>
    <description>&lt;P&gt;I need to prepare a data panel with one row per customer and from this panel will create reports in Tableu.&lt;/P&gt;
&lt;P&gt;This is the reason for wide structure.&lt;/P&gt;
&lt;P&gt;Do you still think that it is wrong (for using panel)?&lt;/P&gt;</description>
    <pubDate>Sun, 27 Jun 2021 03:48:05 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2021-06-27T03:48:05Z</dc:date>
    <item>
      <title>label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750610#M236135</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way to label the following variables during proc transpose .&lt;/P&gt;
&lt;P&gt;Label of variable Wealth1 will be&amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;Stocks wealth1&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;Label of variable Wealth2 will be&amp;nbsp;&amp;nbsp;Stocks wealth2&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Label of variable Wealth3 will be&amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;Stocks wealth3&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Label of variable Wealth4 will be&amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;Stocks wealth4&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Label of variable Wealth5 will be&amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;Stocks wealth15&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
label wealth='Stocks wealth';
input CustID month wealth;
cards;
1 2101 10
1 2102 20
1 2103 30
1 2104 40
1 2105 50
2 2101 5
2 2102 10
2 2103 15
2 2104 20
2 2105 25
;
Run;
proc transpose data=have  out=Want (drop=_name_ ) prefix=wealth;
VAR wealth ;
BY CustID ;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Jun 2021 17:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750610#M236135</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-06-26T17:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750613#M236136</link>
      <description>&lt;P&gt;Prepare the wanted names and labels in a preceding step, and use the ID and IDLABEL statements of&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/n1xno5xgs39b70n0zydov0owajj8.htm" target="_blank" rel="noopener"&gt;PROC TRANSPOSE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2021 17:42:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750613#M236136</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-26T17:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750616#M236137</link>
      <description>&lt;P&gt;After all this time, with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; and myself and others constantly advising you to avoid wide data sets, I am surprised that you keep using wide data sets. The best thing to do would be to leave the data as long, and then programming is sooooo much easier.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2021 18:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750616#M236137</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-26T18:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750617#M236138</link>
      <description>&lt;P&gt;I (of course) concur with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;about the uselessness of wide datasets, see Maxim 19.&lt;/P&gt;
&lt;P&gt;Wide &lt;EM&gt;reports&lt;/EM&gt; can easily be done with PROC REPORT.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2021 18:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750617#M236138</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-26T18:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750633#M236141</link>
      <description>&lt;P&gt;I need to prepare a data panel with one row per customer and from this panel will create reports in Tableu.&lt;/P&gt;
&lt;P&gt;This is the reason for wide structure.&lt;/P&gt;
&lt;P&gt;Do you still think that it is wrong (for using panel)?&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 03:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750633#M236141</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-06-27T03:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750634#M236142</link>
      <description>&lt;P&gt;Thanks, however during transpose from long to wide there is no need to use ID statement.&lt;/P&gt;
&lt;P&gt;What is the way to add the labels?&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 03:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750634#M236142</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-06-27T03:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750640#M236145</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, however during transpose from long to wide there is no need to use ID statement.&lt;/P&gt;
&lt;P&gt;What is the way to add the labels?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The IDLABEL statement.&lt;/P&gt;
&lt;P&gt;So you need to create the labels first.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 05:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750640#M236145</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-27T05:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750641#M236146</link>
      <description>&lt;P&gt;Can't Tableau create reports from long data? I'd be surprised.&lt;/P&gt;
&lt;P&gt;Just supply Tableau with the long data -prepared as needed- and let Tableau present it.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 05:29:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750641#M236146</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-27T05:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: label variables during proc transpose long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750689#M236160</link>
      <description>&lt;P&gt;Modify your prefix in proc transpose as follows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have  out=Want (drop=_name_  _LABEL_) prefix='Stocks Wealth'n;
VAR wealth ;
BY CustID ;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Your output will be like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sajid01_0-1624813468117.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60785i74BB92A6C7C026E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sajid01_0-1624813468117.png" alt="Sajid01_0-1624813468117.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 17:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750689#M236160</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-06-27T17:04:49Z</dc:date>
    </item>
  </channel>
</rss>

