<?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: Combine two proc report that use the same categorization format in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/527007#M22177</link>
    <description>&lt;P&gt;I see the variables that have names starting with 'tx.' I agree with you, but I am writing about the other two variables that are your group labels, starting with 'Solde1.' These group labels can definitely be in a variable Group having flag values 1 ('Solde1_1GRegie_Cour') or 2 ('Solde1_2GRegie_2021'). Then you can make that Group variable an across variable, producing the table that you show.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jan 2019 18:01:37 GMT</pubDate>
    <dc:creator>pink_poodle</dc:creator>
    <dc:date>2019-01-14T18:01:37Z</dc:date>
    <item>
      <title>Combine two proc report that use the same categorization format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/525920#M22148</link>
      <description>&lt;P&gt;I'm producing these two tables with proc report:&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="report1.png" style="width: 528px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26161i3EC9DB596092625C/image-size/large?v=v2&amp;amp;px=999" role="button" title="report1.png" alt="report1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Using this code :&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;proc report data=d_result.f_medo_tbc;

	title 	"Soldes courants - &amp;amp;DemogAnneeCourante";
	column	tx_couv_cour_arrond 
		Solde1_1GRegie_Cour,(n pctn)
		Solde1_1GRegie_Cour=cour_sum
		;

	define tx_couv_cour_arrond / group format=taux_de_couverture.;
	define pctn / FORMAT=NLPCTN8.1;
	define cour_sum / analysis sum f=6.0;


run;

proc report data=d_result.f_medo_tbc;

	title 	"Soldes courants - &amp;amp;DemogAnneeProjetee";
	column	tx_couv_proj_arrond
		Solde1_2GRegie_2021,(n pctn)
		Solde1_2GRegie_2021=proj_sum
		;

	define tx_couv_proj_arrond / group format=taux_de_couverture.;
	define pctn / FORMAT=NLPCTN8.1;
	define proj_sum / analysis sum f=6.0;

run;&lt;/CODE&gt;&lt;/PRE&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get this result (doctored image) :&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="report2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26162iB68F7D470CD2F165/image-size/large?v=v2&amp;amp;px=999" role="button" title="report2.png" alt="report2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, the format used for grouping is the same (taux_de_couverture.), but the variables differ.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried combining the two procs into a single one...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=d_result.f_medo_tbc;

	title 	"Soldes courants - &amp;amp;DemogAnneeCourante";
	column	tx_couv_cour_arrond 
			Solde1_1GRegie_Cour,(n pctn)
			Solde1_1GRegie_Cour=cour_sum

			tx_couv_proj_arrond
			Solde1_2GRegie_2021,(n pctn)
			Solde1_2GRegie_2021=proj_sum
			;

	define tx_couv_cour_arrond / group format=taux_de_couverture.;
	define pctn / FORMAT=NLPCTN8.1;
	define cour_sum / analysis sum f=6.0;

	define tx_couv_proj_arrond / group format=taux_de_couverture.;
	define pctn / FORMAT=NLPCTN8.1;
	define proj_sum / analysis sum f=6.0;


run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;..but as expected the grouping simply gets divided into further groups :&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="report3.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26163iC5F84D08C6EE3012/image-size/large?v=v2&amp;amp;px=999" role="button" title="report3.png" alt="report3.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;I tried a solution using proc tabulate but I'm also stuck with two procs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas? Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 22:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/525920#M22148</guid>
      <dc:creator>Franck1048</dc:creator>
      <dc:date>2019-01-09T22:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combine two proc report that use the same categorization format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/525972#M22151</link>
      <description>&lt;P&gt;When you consolidate the tables like this, you are adding an across variable, that has two values: "Solde...2021" and "Solde...Cour." This variable should appear in the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define newvar/ across;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To add this variable, you would need to flag your data with either "Solde...2021" or "Sold...Cour", since this variable is basically a flag.&lt;/P&gt;&lt;P&gt;The following SAS example has a table similar to yours, the part about formats is less relevant:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0be7xxo5rliwfn1ie99h30wepg1.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0be7xxo5rliwfn1ie99h30wepg1.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 04:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/525972#M22151</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2019-01-10T04:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Combine two proc report that use the same categorization format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/526952#M22175</link>
      <description>&lt;P&gt;I'm not sure this is what I'm trying to do. It looks like it, but after reading it's not the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Across splits a single variable into columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my needs, it's my grouping variables that are different.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tx_couv_cour_arrond and&amp;nbsp;tx_couv_proj_arrond are two different variables that I make groups with using a common format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So one observation could be in group 01 for&amp;nbsp;&lt;SPAN&gt;tx_couv_cour_arrond&amp;nbsp;and in group 04 for&amp;nbsp;tx_couv_proj_arrond.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 15:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/526952#M22175</guid>
      <dc:creator>Franck1048</dc:creator>
      <dc:date>2019-01-14T15:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combine two proc report that use the same categorization format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/527007#M22177</link>
      <description>&lt;P&gt;I see the variables that have names starting with 'tx.' I agree with you, but I am writing about the other two variables that are your group labels, starting with 'Solde1.' These group labels can definitely be in a variable Group having flag values 1 ('Solde1_1GRegie_Cour') or 2 ('Solde1_2GRegie_2021'). Then you can make that Group variable an across variable, producing the table that you show.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 18:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/527007#M22177</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2019-01-14T18:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Combine two proc report that use the same categorization format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/527343#M22181</link>
      <description>&lt;P&gt;Ok I understand. Then yes &lt;STRONG&gt;across&lt;/STRONG&gt; is definitely part of the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've still yet to figure out if it's possible to output a single table using two different vars with the same format for grouping.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 15:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/527343#M22181</guid>
      <dc:creator>Franck1048</dc:creator>
      <dc:date>2019-01-15T15:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Combine two proc report that use the same categorization format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/527780#M22193</link>
      <description>&lt;P&gt;&amp;nbsp;Where is the variable &lt;EM&gt;tx_couv_proj_arrond&lt;/EM&gt; on the doctored image?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:22:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combine-two-proc-report-that-use-the-same-categorization-format/m-p/527780#M22193</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2019-01-16T18:22:22Z</dc:date>
    </item>
  </channel>
</rss>

