<?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: Possible to regroup rows under subheader column in PROC REPORT with ASSESS option? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Possible-to-regroup-rows-under-subheader-column-in-PROC-REPORT/m-p/822343#M324728</link>
    <description>&lt;P&gt;Almost there - if I run the following proc report the header and subheaders are correct, but I'm seeing duplicate cylinder rows in the table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=chisq_freqpct;
  	column cylinders origin,(count pct_row) N P_PCHI;
  	define cylinders / display /*group*/;
	define origin / across;
	define count / display;
	define pct_row / display;
	define N / group;
	define P_PCHI / group;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Jul 2022 19:09:10 GMT</pubDate>
    <dc:creator>RobertWF1</dc:creator>
    <dc:date>2022-07-08T19:09:10Z</dc:date>
    <item>
      <title>Possible to regroup rows under subheader column in PROC REPORT with ASSESS option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Possible-to-regroup-rows-under-subheader-column-in-PROC-REPORT/m-p/822328#M324717</link>
      <description>&lt;P&gt;I've built a dataset containing row percent and count values from a two-way frequency table + the chi-squared p-value and total sample size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I regroup the row percent and count columns under one of the variables as a subheader?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.cars; 	
	tables origin*cylinders / chisq totpct outpct list out=freqpct(keep=cylinders origin count pct_row); 
	output out=chisq(keep=N	P_PCHI) all;
run;
data freqpct;
set freqpct;
	var=1;
run;
data chisq;
set chisq;
	var=1;
run;
proc sql;
	create table chisq_freqpct
	as select *
	from freqpct a
	inner join
	chisq b
	on a.var=b.var;
quit;
proc report data=chisq_freqpct;
  	column origin cylinders count pct_row N P_PCHI;&lt;BR /&gt;  	define origin / group;&lt;BR /&gt;  	define cylinders / group;
	define count / display;
	define pct_row / display;
	define N / group;
	define P_PCHI / group;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is there a way to use the ASSESS option to display separate columns of pct_row and count values by each value of origin ("Asia", "Europe", "USA"), but still retain N and P_PCHI in the single top row of the table?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 18:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Possible-to-regroup-rows-under-subheader-column-in-PROC-REPORT/m-p/822328#M324717</guid>
      <dc:creator>RobertWF1</dc:creator>
      <dc:date>2022-07-08T18:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to regroup rows under subheader column in PROC REPORT with ASSESS option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Possible-to-regroup-rows-under-subheader-column-in-PROC-REPORT/m-p/822343#M324728</link>
      <description>&lt;P&gt;Almost there - if I run the following proc report the header and subheaders are correct, but I'm seeing duplicate cylinder rows in the table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=chisq_freqpct;
  	column cylinders origin,(count pct_row) N P_PCHI;
  	define cylinders / display /*group*/;
	define origin / across;
	define count / display;
	define pct_row / display;
	define N / group;
	define P_PCHI / group;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2022 19:09:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Possible-to-regroup-rows-under-subheader-column-in-PROC-REPORT/m-p/822343#M324728</guid>
      <dc:creator>RobertWF1</dc:creator>
      <dc:date>2022-07-08T19:09:10Z</dc:date>
    </item>
  </channel>
</rss>

