<?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: How to group by in PROC REPORT in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639775#M21706</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;No complaint about the DT values not being in date order?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Right. As soon as the data set has APR19 the ordering is screwed up. Better would be to convert JAN19, FEB19 etc. to actual SAS date values instead of text strings, and then this ordering issue is easily handled.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2020 14:26:22 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-04-14T14:26:22Z</dc:date>
    <item>
      <title>How to group by in PROC REPORT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639700#M21701</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am trying to group by the output of a PROC REPORT (based on the below example, I'd like to&amp;nbsp;only show 4 rows, rather than repeating the APPs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
input DT$ APP$ Arrived$;
datalines;
JAN19 APP1 Y
JAN19 APP2 Y
JAN19 APP3 Y
JAN19 APP4 N
FEB19 APP1 N
FEB19 APP2 Y
FEB19 APP3 Y
FEB19 APP4 Y
MAR19 APP1 Y
MAR19 APP2 Y
MAR19 APP3 N
MAR19 APP4 N
;run;

proc report data=have nowd;
	column  APP (DT,  Arrived) ;
	define DT / across  'DT' ORDER=DATA;
;
quit;&lt;/PRE&gt;&lt;P&gt;I have tried many different combinations but I cannot get the right syntax (my main issue seems to be that the variable "Arrived" is not a numeric; for example if I add&lt;/P&gt;&lt;PRE&gt;define APP / group  'APP';&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;it complains I don't have any statistics associated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Many thanks&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 11:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639700#M21701</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-04-14T11:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by in PROC REPORT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639704#M21702</link>
      <description>&lt;P&gt;You haven't explained the output that you want to get from PROC REPORT. What are the rows? What are the columns? What number should appear in each "cell"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want counts in each "cell"? PROC FREQ will do this.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 11:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639704#M21702</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-14T11:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by in PROC REPORT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639706#M21703</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/321375"&gt;@MART1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=have nowd;
	column  APP (DT,  Arrived) ;
	define DT / across  'DT' ORDER=DATA;
	define APP/ group;
	define Arrived / group;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-04-14 à 13.56.11.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38289iD74143E2EA772B46/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2020-04-14 à 13.56.11.png" alt="Capture d’écran 2020-04-14 à 13.56.11.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 11:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639706#M21703</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-04-14T11:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by in PROC REPORT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639769#M21705</link>
      <description>&lt;P&gt;No complaint about the DT values not being in date order?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 14:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639769#M21705</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-14T14:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by in PROC REPORT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639775#M21706</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;No complaint about the DT values not being in date order?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Right. As soon as the data set has APR19 the ordering is screwed up. Better would be to convert JAN19, FEB19 etc. to actual SAS date values instead of text strings, and then this ordering issue is easily handled.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 14:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/639775#M21706</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-14T14:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by in PROC REPORT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/640009#M21718</link>
      <description>I see I had to group by all variables; it's working now thanks ed_sas_member</description>
      <pubDate>Wed, 15 Apr 2020 07:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/640009#M21718</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-04-15T07:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by in PROC REPORT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/640011#M21719</link>
      <description>thanks both; in fact I created a dummy table focussing on the group by function; I did not think about the date format. thanks anyway</description>
      <pubDate>Wed, 15 Apr 2020 07:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-group-by-in-PROC-REPORT/m-p/640011#M21719</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-04-15T07:33:23Z</dc:date>
    </item>
  </channel>
</rss>

