<?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 proc report - merging headers (and columns) with across and grouped variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724355#M80271</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code runs, yay! But doesn't get me the desired results...&lt;/P&gt;&lt;P&gt;I currently get:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJB_NZ_2-1615178319172.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55606i8099C811F5FD2B32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RJB_NZ_2-1615178319172.png" alt="RJB_NZ_2-1615178319172.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'd like the top two header rows put into one.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And&lt;/STRONG&gt; I'd like the last two of those column headers to be in red font and merged across 2 cells, to line up with the columns below them.&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJB_NZ_3-1615178503749.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55607i20CAA1BF0E2F7DBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RJB_NZ_3-1615178503749.png" alt="RJB_NZ_3-1615178503749.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that's a few things together, but I'm worried that they'll interact and so can't be considered separetly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rodney&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let PathAndFile = 'c:\MyFolder\Shoes Test.xlsx';
data shoes_raw;
	set sashelp.shoes;
	where product in ('Sandal' 'Slipper' 'Sport Shoe');
run;

ODS excel 
	file = "&amp;amp;PathAndFile."
	options (	embedded_titles='OFF' /*On means text in TITLE statement of proc tabulate will show in excel file*/
				sheet_interval="none" /*when to split off to a new page - "none" means not at all*/
				sheet_name='Shoes Tests' /*Name of Sheet*/
				gridlines ='off' /*set printable gridlines*/
				absolute_column_width='23, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10' /*setting column widths*/
				absolute_row_height='15.75' /*setting column height*/
			);


	proc report data = shoes_raw missing;

		*stating columns to be in the report and their order;
		column region ('Products sold' stores,product)
					  ('Sales amount' Sales,product)
					  ('Sandal short' Sandal_Diff)
					  ('Shoe short' Shoe_Diff)
			    ;

		*define columns directly from dataset variables;
		define region  / 'Global region' group
								 style(header)=[just=left borderbottomstyle=solid bordertopstyle=solid];
		define stores  / ' ' analysis sum format=comma.
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2'];
		define Sales   / ' ' analysis sum format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2'];
		define product / ' ' across order=internal
								 style(header)=[borderbottomstyle=solid bordertopstyle=solid just=right.];
		*define cumputed columns;
		define Sandal_Diff / "Slipper - Sandal" computed format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2']
							   style(column)=[ tagattr='MERGEACROSS:2'];
		define Shoe_Diff / "Slipper - Sport Shoe" computed format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2']
							   style(column)=[tagattr='MERGEACROSS:2'];


		*computing columns (that are based off other columns);
			*columns produced from the across option of the 'month' variable do not have a name so must be reffered to by their column number, as can be counted in the column statement;
		compute Sandal_Diff;
			Sandal_Diff = _c6_ - _c5_;
		endcomp;
		compute Shoe_Diff;
			Shoe_Diff = _c6_ - _c7_;
		endcomp;
	run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Mar 2021 04:43:13 GMT</pubDate>
    <dc:creator>RJB_NZ</dc:creator>
    <dc:date>2021-03-08T04:43:13Z</dc:date>
    <item>
      <title>proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724355#M80271</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code runs, yay! But doesn't get me the desired results...&lt;/P&gt;&lt;P&gt;I currently get:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJB_NZ_2-1615178319172.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55606i8099C811F5FD2B32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RJB_NZ_2-1615178319172.png" alt="RJB_NZ_2-1615178319172.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'd like the top two header rows put into one.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And&lt;/STRONG&gt; I'd like the last two of those column headers to be in red font and merged across 2 cells, to line up with the columns below them.&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJB_NZ_3-1615178503749.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55607i20CAA1BF0E2F7DBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RJB_NZ_3-1615178503749.png" alt="RJB_NZ_3-1615178503749.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that's a few things together, but I'm worried that they'll interact and so can't be considered separetly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rodney&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let PathAndFile = 'c:\MyFolder\Shoes Test.xlsx';
data shoes_raw;
	set sashelp.shoes;
	where product in ('Sandal' 'Slipper' 'Sport Shoe');
run;

ODS excel 
	file = "&amp;amp;PathAndFile."
	options (	embedded_titles='OFF' /*On means text in TITLE statement of proc tabulate will show in excel file*/
				sheet_interval="none" /*when to split off to a new page - "none" means not at all*/
				sheet_name='Shoes Tests' /*Name of Sheet*/
				gridlines ='off' /*set printable gridlines*/
				absolute_column_width='23, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10' /*setting column widths*/
				absolute_row_height='15.75' /*setting column height*/
			);


	proc report data = shoes_raw missing;

		*stating columns to be in the report and their order;
		column region ('Products sold' stores,product)
					  ('Sales amount' Sales,product)
					  ('Sandal short' Sandal_Diff)
					  ('Shoe short' Shoe_Diff)
			    ;

		*define columns directly from dataset variables;
		define region  / 'Global region' group
								 style(header)=[just=left borderbottomstyle=solid bordertopstyle=solid];
		define stores  / ' ' analysis sum format=comma.
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2'];
		define Sales   / ' ' analysis sum format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2'];
		define product / ' ' across order=internal
								 style(header)=[borderbottomstyle=solid bordertopstyle=solid just=right.];
		*define cumputed columns;
		define Sandal_Diff / "Slipper - Sandal" computed format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2']
							   style(column)=[ tagattr='MERGEACROSS:2'];
		define Shoe_Diff / "Slipper - Sport Shoe" computed format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2']
							   style(column)=[tagattr='MERGEACROSS:2'];


		*computing columns (that are based off other columns);
			*columns produced from the across option of the 'month' variable do not have a name so must be reffered to by their column number, as can be counted in the column statement;
		compute Sandal_Diff;
			Sandal_Diff = _c6_ - _c5_;
		endcomp;
		compute Shoe_Diff;
			Shoe_Diff = _c6_ - _c7_;
		endcomp;
	run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 04:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724355#M80271</guid>
      <dc:creator>RJB_NZ</dc:creator>
      <dc:date>2021-03-08T04:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724661#M80277</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="report.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55681i0C28043E2E39CB3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="report.png" alt="report.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For the last two columns, I could not get a second set of labels (what you have shown in red).&amp;nbsp; I guess you could do a combined label spanning the two columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	proc report data = shoes_raw missing;
		*stating columns to be in the report and their order;
		column region ('Products sold' stores, product)
					  ('Sales amount' Sales, product)
/* 					
					  ('Sandal short' Sandal_Diff)
					  ('Shoe short' Shoe_Diff)
	     */
					 ( Sandal_Diff Shoe_Diff)
			    ;

		*define columns directly from dataset variables;
		define region  / group  'Global region' 
								 style(header)=[just=left borderbottomstyle=solid bordertopstyle=solid];
		define stores  /  analysis sum format=comma. ''
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2'];
		define Sales   /  analysis sum format=dollar.2 ''
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2'];
		define product / across order=internal ''
								 style(header)=[borderbottomstyle=solid bordertopstyle=solid just=right.];
		*define cumputed columns;
		define Sandal_Diff / "Slipper - Sandal" computed format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2']
							   style(column)=[ tagattr='MERGEACROSS:2'];
		define Shoe_Diff / "Slipper - Sport Shoe" computed format=dollar.2
							   style(header)=[just=right borderbottomstyle=solid bordertopstyle=solid  tagattr='MERGEACROSS:2']
							   style(column)=[tagattr='MERGEACROSS:2'];

		*computing columns (that are based off other columns);
			*columns produced from the across option of the 'month' variable do not have a name so must be reffered to by their column number, as can be counted in the column statement;
		compute Sandal_Diff;
			Sandal_Diff = _c6_ - _c5_;
		endcomp;
		compute Shoe_Diff;
			Shoe_Diff = _c6_ - _c7_;
		endcomp;
	run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Mar 2021 21:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724661#M80277</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2021-03-08T21:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724672#M80278</link>
      <description>&lt;P&gt;Thanks ghosh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I actually want individual titles for&amp;nbsp;Sandal_Diff and Shoe_Diff (as per my original code).&lt;/P&gt;&lt;P&gt;I just want the whole of Sandal_Diff (data, and 2 levels of header) to span 2 Excel columns. And then likewise for Shoe_Diff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason is that when using my real world (confidential) data then I need the header words to be across 2 columns to fit the words into the cells.&lt;/P&gt;&lt;P&gt;But I don't want to change the column width as that will muck up subsequent tables on the same sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Frustratingly, this all looks fine in the SAS (HTML) output, it's just when I open the Excel spreadsheet that it doesn't work.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 22:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724672#M80278</guid>
      <dc:creator>RJB_NZ</dc:creator>
      <dc:date>2021-03-08T22:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724695#M80281</link>
      <description>&lt;P&gt;If you just need to fit in a long label just use the split option on the proc report line and embed the chosen split character in the label&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 23:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724695#M80281</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2021-03-08T23:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724711#M80282</link>
      <description>Unfortunately no, I'm not looking for alternativew ways to lay out the report.&lt;BR /&gt;Please go back to my original question to see the layout I need to recreate.</description>
      <pubDate>Tue, 09 Mar 2021 00:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724711#M80282</guid>
      <dc:creator>RJB_NZ</dc:creator>
      <dc:date>2021-03-09T00:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724750#M80283</link>
      <description>Though I'd be happy enough if a solution were to introduce more rows (perhaps merging across those.)</description>
      <pubDate>Tue, 09 Mar 2021 03:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/724750#M80283</guid>
      <dc:creator>RJB_NZ</dc:creator>
      <dc:date>2021-03-09T03:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/725729#M80302</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS excel 
	file = "c:\MyFolder\Shoes Test.xlsx"
	options (	embedded_titles='OFF' 
				sheet_interval="none" 
				sheet_name='Shoes Tests' 
				gridlines ='off' 
				absolute_column_width='23, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10' 
				absolute_row_height='15.75' 
			);

proc report data=sashelp.shoes;
	where product in ('Sandal' 'Slipper' 'Sport Shoe');
	column ('Global Regions' Region) ('Products sold' Product),stores ('Sales amount' Product), sales 
	('Sandal short' ('' ('Slipper - Sandal' Sandal_Diff)))  ('Shoe short' ('' ('Slipper - Sport shoe' Shoe_Diff)));
	define Region  		/ group order=internal;
	define Product 		/ across '';
	define Region  		/ '';
	define stores  		/ '';
	define sales   		/ '';
	define Sandal_Diff 	/ computed format=dollar.2 '';
	define Shoe_Diff 	/ computed format=dollar.2 '';
	
	compute Shoe_Diff;
			Shoe_Diff = _c6_ - _c7_;
			Sandal_Diff = _c6_ - _c5_;
	endcomp;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Mar 2021 08:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/725729#M80302</guid>
      <dc:creator>Athenkosi</dc:creator>
      <dc:date>2021-03-12T08:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/726162#M80305</link>
      <description>&lt;P&gt;Thanks&amp;nbsp; Athenkosi,&lt;/P&gt;
&lt;P&gt;That's certainly covered the first step of getting all the heading on the correct lines.&lt;/P&gt;
&lt;P&gt;I then realised I could do all my header cell merging using the report level header style with a traffic lighting version of tagattr = mergeaccross.&lt;/P&gt;
&lt;P&gt;This did bring about a strange quirk, when the last header (Slipper - Sport shoe) was merged across cells it did the same to cell A1&lt;/P&gt;
&lt;P&gt;That's why I added a Dummy Value label and coloured it white.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code below carries on from&amp;nbsp;Athenkosi code, and answers everything I need (it doesn't have the red colouring, but that'll be easy enough... fingers crossed)&lt;/P&gt;
&lt;P&gt;Thanks everyone&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS excel 
       file = "C:\My Folder\Shoes Test.xlsx"
       options (     embedded_titles='OFF' 
                           sheet_interval="none" 
                           sheet_name='Shoes Tests' 
                           gridlines ='off' 
                           absolute_column_width='23, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10' 
                           absolute_row_height='15.75' 
                     );
 
       proc format;
              value $MergeAcross_Headers
                     'Sandal short' , 'Slipper - Sandal', 'Shoe short', 'Slipper - Sport shoe' = MERGEACROSS:2
              ;
              value $DummyWhiteOut
                     'Dummy Value' = white
              ;
       run;
 
       proc report data=sashelp.shoes
                                  style(header)=[tagattr=$MergeAcross_Headers. color=$DummyWhiteOut.];
              where product in ('Sandal' 'Slipper' 'Sport Shoe');
              column ('Dummy Value'(''('Global Regions' Region))) ('Products sold' Product),stores ('Sales amount' Product), sales 
              ('Sandal short' ('' ('Slipper - Sandal' Sandal_Diff)))  ('Shoe short' ('' ('Slipper - Sport shoe' Shoe_Diff)));
              define Region                / group order=internal;
              define Product               / across '';
              define Region                / '';
              define stores                / '';
              define sales                 / '';
              define Sandal_Diff    / computed format=dollar.2 ''
                                                          style(column)=[ tagattr='MERGEACROSS:2'];
              define Shoe_Diff      / computed format=dollar.2 ''
                                                          style(column)=[ tagattr='MERGEACROSS:2'];
              
              compute Shoe_Diff;
                           Shoe_Diff = _c6_ - _c7_;
                           Sandal_Diff = _c6_ - _c5_;
              endcomp;
       run;
 
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Mar 2021 11:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/726162#M80305</guid>
      <dc:creator>RJB_NZ</dc:creator>
      <dc:date>2021-03-15T11:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/726163#M80306</link>
      <description>&lt;P&gt;Sorry I inserted the wrong code, and accepted it as the solution, doh!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the correct solution:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS excel 
	file = "C:\My Folder\Shoes Test.xlsx"
	options (	embedded_titles='OFF' 
				sheet_interval="none" 
				sheet_name='Shoes Tests' 
				gridlines ='off' 
				absolute_column_width='23, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10' 
				absolute_row_height='15.75' 
			);

	proc format;
		value $MergeAcross_Headers
			'Sandal short' , 'Slipper - Sandal', 'Shoe short', 'Slipper - Sport shoe' = MERGEACROSS:2
		;
		value $DummyWhiteOut
			'Dummy Value' = white
		;
	run;

	proc report data=sashelp.shoes
					style(header)=[tagattr=$MergeAcross_Headers. color=$DummyWhiteOut.];
		where product in ('Sandal' 'Slipper' 'Sport Shoe');
		column ('Dummy Value'(''('Global Regions' Region))) ('Products sold' Product),stores ('Sales amount' Product), sales 
		('Sandal short' ('' ('Slipper - Sandal' Sandal_Diff)))  ('Shoe short' ('' ('Slipper - Sport shoe' Shoe_Diff)));
		define Region  		/ group order=internal;
		define Product 		/ across '';
		define Region  		/ '';
		define stores  		/ '';
		define sales   		/ '';
		define Sandal_Diff 	/ computed format=dollar.2 ''
								   style(column)=[ tagattr='MERGEACROSS:2'];
		define Shoe_Diff 	/ computed format=dollar.2 ''
								   style(column)=[ tagattr='MERGEACROSS:2'];
		
		compute Shoe_Diff;
				Shoe_Diff = _c6_ - _c7_;
				Sandal_Diff = _c6_ - _c5_;
		endcomp;
	run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Mar 2021 22:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/726163#M80306</guid>
      <dc:creator>RJB_NZ</dc:creator>
      <dc:date>2021-03-14T22:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - merging headers (and columns) with across and grouped variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/811109#M81796</link>
      <description>&lt;P&gt;can i get this output on this format column first merge with cells&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daily1_0-1651514650184.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71082i2EB778F1317C5B9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daily1_0-1651514650184.png" alt="Daily1_0-1651514650184.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 18:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-merging-headers-and-columns-with-across-and-grouped/m-p/811109#M81796</guid>
      <dc:creator>Daily1</dc:creator>
      <dc:date>2022-05-02T18:04:26Z</dc:date>
    </item>
  </channel>
</rss>

