<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose/m-p/560351#M156671</link>
    <description>&lt;P&gt;The result you get is 100% correct when using "notsorted", the docs say: "If observations with the same values for the BY variables are not contiguous, then the procedure treats each contiguous set as a separate BY group."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have to sort dataset aaa to get what you want.&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2019 05:35:27 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2019-05-21T05:35:27Z</dc:date>
    <item>
      <title>proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose/m-p/560347#M156668</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I have a data set called aaa and by using proc transpose I want to get another data set called bbb.&lt;/P&gt;
&lt;P&gt;The result of bbb data set is not as I want because under column "pet" I expect to have only 3 rows: dog,cat,fish&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data aaa;
input pet_owner $ pet $  poulation;
cards;
Dave dog 2
Dave cat 1 
Yulia dog 2
Yulia cat 2
Joe fish 7
Joe dog 1
Joe cat 1
;
run;


proc transpose data=aaa name=Metric out=bbb;
id pet_owner;
by pet NOTSORTED;
var poulation;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 04:35:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose/m-p/560347#M156668</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-05-21T04:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose/m-p/560351#M156671</link>
      <description>&lt;P&gt;The result you get is 100% correct when using "notsorted", the docs say: "If observations with the same values for the BY variables are not contiguous, then the procedure treats each contiguous set as a separate BY group."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have to sort dataset aaa to get what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 05:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose/m-p/560351#M156671</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-05-21T05:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose/m-p/560352#M156672</link>
      <description>Sort the data by PET, and remove the word NOTSORTED.</description>
      <pubDate>Tue, 21 May 2019 05:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose/m-p/560352#M156672</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-05-21T05:36:00Z</dc:date>
    </item>
  </channel>
</rss>

