<?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: Proc Report Change Parent Header for Computed Value in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Change-Parent-Header-for-Computed-Value/m-p/525313#M73513</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It would have been nice if you had provided some fake data to run with. In the absence of any data, I made some fake data, which may or may not be like your numbers:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="term_fakedata.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26084iF8C30954B565BABF/image-size/large?v=v2&amp;amp;px=999" role="button" title="term_fakedata.png" alt="term_fakedata.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; But you need to "rearrange" the order of the items in your COLUMN statement, which will change the absolute column numbers, but I think this is closer to what you want:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="change_report_calcs_headers.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26083i28B446ABC44A26C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="change_report_calcs_headers.png" alt="change_report_calcs_headers.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jan 2019 02:52:15 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2019-01-08T02:52:15Z</dc:date>
    <item>
      <title>Proc Report Change Parent Header for Computed Value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Change-Parent-Header-for-Computed-Value/m-p/525274#M73512</link>
      <description>&lt;P&gt;I have my proc report all set up, but there is one problem. The male header spans into my total column. All the values are correct, but the total column is a total of female and male students. I need to find a way to separate it from the male spanned header.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture4.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26079iF17BB15F434BE97D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.PNG" alt="Capture4.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc report data=work.pivottest
	style(header)={just=c};
	
	columns FTICFlag
	TermDescription,
	GenderDescription,
	(StudentCount
	StudentPct
	TermTotal);


	define FTICFlag / group 'FTIC Indicator';
	define TermDescription / across 'Term';
	define GenderDescription / across 'Gender';
	define StudentCount / analysis sum 'Enrolled';
	define StudentPct / computed format=percent12.2 '%';
	define TermTotal / computed nozero 'Total';

	/***********Column Map*************/
	/*	C1 = FTIC Ind				  */
	/*	C2 = Female Enrolled		  */
	/*	C3 = Female %				  */
	/*	C4 = Hidden Subtotal		  */
	/*	C5 = Male Enrolled			  */
	/*	C6 = Male %					  */
	/*	C7 = Subtotal				  */
	/*	C8 = Female Enrolled		  */
	/*	C9 = Female %				  */
	/*  C10 = Hidden Subtotal		  */
	/*	C11 = Male Enrolled			  */
	/*  C12 = Male %				  */
	/*	C13 = Subtotal				  */
	/**********************************/

compute StudentPct;
	/* 1st Term Female Enrolled % */
	_c3_ = _c2_ / (_c2_+_c5_); 

	/* 1st Term Male Enrolled % */
	_c6_ = _c5_ / (_c2_+_c5_);

	/* 2nd Term Female Enrolled % */
	_c9_ = _c8_ / (_c8_+_c11_);

	/* 2nd Term Male Enrolled % */
	_c12_ = _c11_ / (_c8_+_c11_);
endcomp;

compute TermTotal;
	/*First Term Total Students */ 
	_c7_ = _c2_ + _c5_;

	/*Second Term Total Students */
	_c13_ = _c8_ + _c11_;
endcomp;

run;&lt;/PRE&gt;&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2019 22:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Change-Parent-Header-for-Computed-Value/m-p/525274#M73512</guid>
      <dc:creator>kocianj</dc:creator>
      <dc:date>2019-01-07T22:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Change Parent Header for Computed Value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Change-Parent-Header-for-Computed-Value/m-p/525313#M73513</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It would have been nice if you had provided some fake data to run with. In the absence of any data, I made some fake data, which may or may not be like your numbers:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="term_fakedata.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26084iF8C30954B565BABF/image-size/large?v=v2&amp;amp;px=999" role="button" title="term_fakedata.png" alt="term_fakedata.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; But you need to "rearrange" the order of the items in your COLUMN statement, which will change the absolute column numbers, but I think this is closer to what you want:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="change_report_calcs_headers.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26083i28B446ABC44A26C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="change_report_calcs_headers.png" alt="change_report_calcs_headers.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 02:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Change-Parent-Header-for-Computed-Value/m-p/525313#M73513</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-01-08T02:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Change Parent Header for Computed Value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Change-Parent-Header-for-Computed-Value/m-p/525534#M73516</link>
      <description>&lt;P&gt;Thank you, that was exactly what I was looking for.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 19:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Change-Parent-Header-for-Computed-Value/m-p/525534#M73516</guid>
      <dc:creator>kocianj</dc:creator>
      <dc:date>2019-01-08T19:00:40Z</dc:date>
    </item>
  </channel>
</rss>

