<?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: need help tracking multiple Name under same ID in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593494#M15526</link>
    <description>&lt;P&gt;Nice, learned something new once again. Was that added in rather recently?&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2019 17:59:06 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-10-02T17:59:06Z</dc:date>
    <item>
      <title>need help tracking multiple Name under same ID</title>
      <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593478#M15521</link>
      <description>&lt;P&gt;Hi Currently I have a data set which has Names and IDs and we have multiple Names under one ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name&amp;nbsp; &amp;nbsp;ID&lt;/P&gt;&lt;P&gt;jon&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;&lt;P&gt;brian&amp;nbsp; &amp;nbsp; &amp;nbsp;12&lt;/P&gt;&lt;P&gt;craig&amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I want is to simplify to have both names in the same row for each ID so something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name Name1 ID&lt;/P&gt;&lt;P&gt;jon&amp;nbsp; &amp;nbsp; &amp;nbsp;brian&amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;&lt;P&gt;craig&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any advice on how I can go about that? or get something similar even?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I can get something like below I can always delete duplicates ID&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name Name1 ID&lt;/P&gt;&lt;P&gt;jon&amp;nbsp; &amp;nbsp; &amp;nbsp;brian&amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;&lt;P&gt;brian&amp;nbsp; jon&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12&lt;/P&gt;&lt;P&gt;craig&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 17:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593478#M15521</guid>
      <dc:creator>haider_imam</dc:creator>
      <dc:date>2019-10-02T17:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: need help tracking multiple Name under same ID</title>
      <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593479#M15522</link>
      <description>&lt;P&gt;Use PROC SORT + NODUPKEY to remove duplicates and then use PROC TRANSPOSE.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have nodupkey;
by id name;
run;

proc transpose data=have out=want prefix=NAME;
by ID;
var name;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/261224"&gt;@haider_imam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Currently I have a data set which has Names and IDs and we have multiple Names under one ID&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name&amp;nbsp; &amp;nbsp;ID&lt;/P&gt;
&lt;P&gt;jon&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;
&lt;P&gt;brian&amp;nbsp; &amp;nbsp; &amp;nbsp;12&lt;/P&gt;
&lt;P&gt;craig&amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what I want is to simplify to have both names in the same row for each ID so something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Name1 ID&lt;/P&gt;
&lt;P&gt;jon&amp;nbsp; &amp;nbsp; &amp;nbsp;brian&amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;
&lt;P&gt;craig&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any advice on how I can go about that? or get something similar even?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even if I can get something like below I can always delete duplicates ID&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Name1 ID&lt;/P&gt;
&lt;P&gt;jon&amp;nbsp; &amp;nbsp; &amp;nbsp;brian&amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;
&lt;P&gt;brian&amp;nbsp; jon&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12&lt;/P&gt;
&lt;P&gt;craig&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 17:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593479#M15522</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-02T17:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: need help tracking multiple Name under same ID</title>
      <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593483#M15523</link>
      <description>&lt;P&gt;First, create a count, then transpose:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;
by id;
run;

data inter;
set have;
by id;
if first.id
then count = 1;
else count + 1;
run;

proc transpose data=inter out=want prefix=name;
by id;
var name;
id count;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Oct 2019 17:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593483#M15523</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-02T17:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: need help tracking multiple Name under same ID</title>
      <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593486#M15524</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;you don't need to create that ID ahead of time anymore, PROC TRANSPOSE does it automatically now as needed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="delete_test.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32915i7B0F560BB604DD68/image-size/large?v=v2&amp;amp;px=999" role="button" title="delete_test.png" alt="delete_test.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 17:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593486#M15524</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-02T17:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: need help tracking multiple Name under same ID</title>
      <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593489#M15525</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input Name $   ID;
cards;
jon        12
brian     12
craig      40
;

proc sql noprint; 
 select max(obs) into :obs 
from ( select count(*) as obs from have group by id ) ;
quit;

proc summary nway data=have missing; 
 class id; 
 output 
 out = want(drop=_type_ _freq_) 
 idgroup(out[&amp;amp;obs](name)=) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Oct 2019 17:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593489#M15525</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-10-02T17:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: need help tracking multiple Name under same ID</title>
      <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593494#M15526</link>
      <description>&lt;P&gt;Nice, learned something new once again. Was that added in rather recently?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 17:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593494#M15526</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-02T17:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: need help tracking multiple Name under same ID</title>
      <link>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593503#M15527</link>
      <description>I think in 9.4 it was modified but not 100% sure.</description>
      <pubDate>Wed, 02 Oct 2019 18:21:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/need-help-tracking-multiple-Name-under-same-ID/m-p/593503#M15527</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-02T18:21:33Z</dc:date>
    </item>
  </channel>
</rss>

