<?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: Rename variable in proc summary in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782818#M39919</link>
    <description>&lt;P&gt;In the penultimate line of your code, try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;output out= EMpull2 (rename=(sum=QTR_COST real_date=year_qtr) ) ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 29 Nov 2021 04:32:04 GMT</pubDate>
    <dc:creator>Norman21</dc:creator>
    <dc:date>2021-11-29T04:32:04Z</dc:date>
    <item>
      <title>Rename variable in proc summary</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782810#M39918</link>
      <description>&lt;P&gt;How do I rename "real_date" to "year_qtr" to show in the proc summary output?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data for_summary;&lt;BR /&gt;set OUTPAT;&lt;BR /&gt;real_date=input(eventdate,YYMMDD10.);&lt;BR /&gt;format real_date date9.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc summary data=for_summary;&lt;BR /&gt;where (cpt between '99201' and '99215')&lt;BR /&gt;or (cpt between '99241' and '99245')&lt;BR /&gt;or (cpt between '99381' and '99397')&lt;BR /&gt;or (cpt between '99354' and '99355')&lt;BR /&gt;or (cpt between '99401' and '99412')&lt;BR /&gt;;&lt;BR /&gt;where also real_date between '01JAN2021'd and '30JUN2021'd;&lt;BR /&gt;class real_date;&lt;BR /&gt;format real_date yyq6.;&lt;BR /&gt;var cost;&lt;BR /&gt;output out=EMpull2 sum=QTR_COST;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 02:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782810#M39918</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-29T02:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rename variable in proc summary</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782818#M39919</link>
      <description>&lt;P&gt;In the penultimate line of your code, try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;output out= EMpull2 (rename=(sum=QTR_COST real_date=year_qtr) ) ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Nov 2021 04:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782818#M39919</guid>
      <dc:creator>Norman21</dc:creator>
      <dc:date>2021-11-29T04:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rename variable in proc summary</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782884#M39921</link>
      <description>&lt;P&gt;Define "output". Do you mean the print output in the Results window/tab, or the resulting dataset?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 11:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782884#M39921</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-29T11:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rename variable in proc summary</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782907#M39923</link>
      <description>&lt;P&gt;That worked. Now, I'm trying to have an output that shows the distinct count of an ID called "memberno" by quarter.&amp;nbsp; So I would like to see how many distinct members there were in Q1 vs. Q2 along with the cpt codes and cost.&amp;nbsp; So it would look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cpt codes&amp;nbsp; Q1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Q2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cost&lt;/P&gt;&lt;P&gt;code1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#ofmmbers with this code&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#of members with this code in&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$$$$&lt;/P&gt;&lt;P&gt;code2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #of members with this code&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc summary data=for_summary;&lt;BR /&gt;where (cpt between '99201' and '99215')&lt;BR /&gt;or (cpt between '99241' and '99245')&lt;BR /&gt;or (cpt between '99381' and '99397')&lt;BR /&gt;or (cpt between '99354' and '99355')&lt;BR /&gt;or (cpt between '99401' and '99412')&lt;BR /&gt;;&lt;BR /&gt;where also real_date between '01JAN2021'd and '30JUN2021'd;&lt;BR /&gt;class cpt real_date;&lt;BR /&gt;format real_date yyq6.;&lt;BR /&gt;var cost;&lt;BR /&gt;output out=EMpull2 (rename=(sum=QTR_COST real_date=year_qtr) ) ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 13:40:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rename-variable-in-proc-summary/m-p/782907#M39923</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-29T13:40:55Z</dc:date>
    </item>
  </channel>
</rss>

