<?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 PROC Transpose - Transpose one variable, and keep all other variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Transpose-Transpose-one-variable-and-keep-all-other/m-p/405960#M67006</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering how I can transpose data based on one variable, then keep all of the additional variables, but without transposing them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;SAS Enterprise Guide 7.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TRANSPOSE DATA=WORK.NON_ENR_PROV_NPI_LIST OUT=PROV_TEST(DROP=_NAME_ _LABEL_);

BY MEMBER_ID;

VAR PRESCRIBER_NPI; 

/* Here are the columns I want to keep, but not transpose by
PROV_LAST_NAME 
PROV_FIRST_NAME 
prov_location_city 
prov_location_state 
prov_location_POSTAL_CODE*/

RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2017 14:10:48 GMT</pubDate>
    <dc:creator>vanpeltm1785</dc:creator>
    <dc:date>2017-10-20T14:10:48Z</dc:date>
    <item>
      <title>PROC Transpose - Transpose one variable, and keep all other variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Transpose-Transpose-one-variable-and-keep-all-other/m-p/405960#M67006</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering how I can transpose data based on one variable, then keep all of the additional variables, but without transposing them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;SAS Enterprise Guide 7.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TRANSPOSE DATA=WORK.NON_ENR_PROV_NPI_LIST OUT=PROV_TEST(DROP=_NAME_ _LABEL_);

BY MEMBER_ID;

VAR PRESCRIBER_NPI; 

/* Here are the columns I want to keep, but not transpose by
PROV_LAST_NAME 
PROV_FIRST_NAME 
prov_location_city 
prov_location_state 
prov_location_POSTAL_CODE*/

RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-Transpose-Transpose-one-variable-and-keep-all-other/m-p/405960#M67006</guid>
      <dc:creator>vanpeltm1785</dc:creator>
      <dc:date>2017-10-20T14:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Transpose - Transpose one variable, and keep all other variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Transpose-Transpose-one-variable-and-keep-all-other/m-p/405966#M67008</link>
      <description>&lt;P&gt;Sorry, could you provide an example, with datastep test data and required output.&amp;nbsp; Your post doesn't really make sense.&amp;nbsp; You mean you have a dataset where you want to pull out some variables, transpose them and then merge back onto your original data?&amp;nbsp; If so:&lt;/P&gt;
&lt;PRE&gt;proc sort data=have out=inter (keep=member_id prescriber_npi);
  by member_id prescriber_npi;
run;
proc transpose data=inter out=t_inter;
  by member_id;
  var prescriber_npi;
run;
data want;
  merge have t_inter;
  by prescriber_id;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-Transpose-Transpose-one-variable-and-keep-all-other/m-p/405966#M67008</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-10-20T14:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Transpose - Transpose one variable, and keep all other variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Transpose-Transpose-one-variable-and-keep-all-other/m-p/406242#M67013</link>
      <description>&lt;PRE&gt;
Check COPY statement.


PROC TRANSPOSE DATA=WORK.NON_ENR_PROV_NPI_LIST OUT=PROV_TEST(DROP=_NAME_ _LABEL_);

BY MEMBER_ID;

VAR PRESCRIBER_NPI; 

copy

PROV_LAST_NAME 
PROV_FIRST_NAME 
prov_location_city 
prov_location_state 
prov_location_POSTAL_CODE;

RUN;


&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Oct 2017 13:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-Transpose-Transpose-one-variable-and-keep-all-other/m-p/406242#M67013</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-10-21T13:30:01Z</dc:date>
    </item>
  </channel>
</rss>

