<?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 Count and assign descending date in Proc Report? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942495#M369561</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my sample test dataset, is there a way to get counts in Order_Test variable and assign descending date in the date variable?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc report data=Test;
 	column Health_Department epi_message_sender eor_spec_id Order_Test Updated_Date;
	define Health_Department / group ;
	define epi_message_sender / group ;
	define eor_spec_id / group ;
	define Order_Test / group ;
	define Updated_Date / group ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Sep 2024 15:44:06 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2024-09-04T15:44:06Z</dc:date>
    <item>
      <title>Count and assign descending date in Proc Report?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942495#M369561</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my sample test dataset, is there a way to get counts in Order_Test variable and assign descending date in the date variable?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc report data=Test;
 	column Health_Department epi_message_sender eor_spec_id Order_Test Updated_Date;
	define Health_Department / group ;
	define epi_message_sender / group ;
	define eor_spec_id / group ;
	define Order_Test / group ;
	define Updated_Date / group ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2024 15:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942495#M369561</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2024-09-04T15:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count and assign descending date in Proc Report?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942510#M369567</link>
      <description>&lt;P&gt;Tested code requires example data.&lt;/P&gt;
&lt;P&gt;Which do you want the value of Order_test to serve as a group, the count of Order_test (which would be a poor group value) or both?&lt;/P&gt;
&lt;P&gt;If you want both here is an example using an alias with a&amp;nbsp;&lt;STRONG&gt;data set you should have so you can test the code.&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;proc report data=class;
   columns sex age age=agen ;
   define sex /group;
   define age /group;
   define agen/ n 'Age count';
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A specific order of values, such as descending date value, if Updated_date is indeed a date value (Guessing here as no example data provided), often requires sorting data and using the Define option Order=data to display them in the order they appear in the data set for group, order or across variables.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 16:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942510#M369567</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-04T16:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count and assign descending date in Proc Report?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942516#M369571</link>
      <description>&lt;P&gt;You can use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p0wy1vqwvz43uhn1g77eb5xlvzqh.htm#p1ltudrzb2l479n14zzpezsbomr2" target="_self"&gt;DESCENDING option&lt;/A&gt; in the DEFINE statement.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 16:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942516#M369571</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-04T16:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count and assign descending date in Proc Report?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942629#M369624</link>
      <description>&lt;PRE&gt;proc report data=sashelp.heart(obs=1000) nowd;
column status sex bp_status n ageatstart;
define status/group;
define sex/group;
define bp_status/group;
define ageatstart/group descending;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Sep 2024 01:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942629#M369624</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-09-05T01:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count and assign descending date in Proc Report?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942736#M369642</link>
      <description>My Order_Test variable is a character, not numeric.</description>
      <pubDate>Thu, 05 Sep 2024 15:31:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942736#M369642</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2024-09-05T15:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Count and assign descending date in Proc Report?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942768#M369644</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;My Order_Test variable is a character, not numeric.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Ok. So?&amp;nbsp; What does that mean in terms of what type of report you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your original post did not really explain what you wanted.&amp;nbsp; You might be able to make it clearer by sharing some example data and what report you want from that data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 17:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-and-assign-descending-date-in-Proc-Report/m-p/942768#M369644</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-05T17:33:42Z</dc:date>
    </item>
  </channel>
</rss>

