<?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: Trying to create groupings from computed variables in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710314#M24794</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7930"&gt;@vincent_s_jones&lt;/a&gt;&amp;nbsp; Can you review the below-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data salaries;
   input team $  type $ salary bonus;
   datalines;
Ben OFF 150000 5000
Tom OFF 200000 2000
Jerry OFF 140000 1500
Al DEF 80000 1000
Bill DEF 90000 2000
;
	run;

proc report data=salaries;
	column type team salary  bonus total;
	define type / order 'Type';
	define team / display;
	define bonus / analysis format=dollar32.2 sum;
	define salary / analysis format=dollar32.2 sum;
	define total/computed noprint  ;
	break after type / summarize
		style=[font_weight=bold background=lightgray];

	compute after type ;
	  total=salary.sum+bonus.sum;
	  line 'Total' total dollar32.2;
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Type&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;team&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;salary&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;bonus&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;DEF&lt;/TD&gt;
&lt;TD class="l data"&gt;Al&lt;/TD&gt;
&lt;TD class="r data"&gt;$80,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$1,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Bill&lt;/TD&gt;
&lt;TD class="r data"&gt;$90,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$2,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;DEF&lt;/TD&gt;
&lt;TD class="c dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$170,000.00&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$3,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="4" class="c linecontent"&gt;Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$173,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;OFF&lt;/TD&gt;
&lt;TD class="l data"&gt;Ben&lt;/TD&gt;
&lt;TD class="r data"&gt;$150,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$5,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Tom&lt;/TD&gt;
&lt;TD class="r data"&gt;$200,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$2,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Jerry&lt;/TD&gt;
&lt;TD class="r data"&gt;$140,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$1,500.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;OFF&lt;/TD&gt;
&lt;TD class="c dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$490,000.00&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$8,500.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="4" class="c linecontent"&gt;Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$498,500.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jan 2021 22:14:41 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2021-01-08T22:14:41Z</dc:date>
    <item>
      <title>Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710277#M24789</link>
      <description>&lt;P&gt;I've searched through the knowledge base, web and message boards and I could not find a similar example, although I know it exist somewhere.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I have a small data set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data salaries;
   input team $  type $ salary bonus;
   datalines;
Ben OFF 150000 5000
Tom OFF 200000 2000
Jerry OFF 140000 1500
Al DEF 80000 1000
Bill DEF 90000 2000
;
	run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I'm trying to group and calculate the salary + bonus (salary_plus).&amp;nbsp;&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=salaries;
	column type team salary salary_plus bonus;
	define type / group 'Type';
	define team / display;
	define bonus / analysis format=dollar32.2 sum;
	define salary / analysis format=dollar32.2 sum;
	define salary_plus / computed noprint ;
	
	compute salary_plus;
		salary_plus= bonus+salary;
	endcomp;

	break after type / summarize
		style=[font_weight=bold background=lightgray];

	compute after type ;
			line 'Total ' salary_plus dollar7.2;
	endcomp;


run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm getting the correct report structure, but at the very end for the &lt;STRONG&gt;Total&lt;/STRONG&gt;, I'm getting a null value.&amp;nbsp; I'd like for it to say&amp;nbsp;&lt;/P&gt;&lt;P&gt;$200,000 for DEF and $498,500 for OFF&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snapshot.jpg" style="width: 265px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53330i0FEB68213F3D9E78/image-dimensions/265x206?v=v2" width="265" height="206" role="button" title="snapshot.jpg" alt="snapshot.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 20:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710277#M24789</guid>
      <dc:creator>vincent_s_jones</dc:creator>
      <dc:date>2021-01-08T20:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710280#M24790</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;Salary and Bonus are both analysis variables in your DEFINE statement. Do you have any messages in the SAS log? You should be seeing something like this: &lt;BR /&gt;NOTE: Variable xxxx is uninitialized.&lt;BR /&gt;&lt;BR /&gt;There should be a note for SALARY and another note for BONUS. What is in your Log?&lt;BR /&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example that should give you an idea about what you need to learn about PROC REPORT and how to reference variables in a COMPUTE block:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1610139259102.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53339iE2FCBA17BB697541/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1610139259102.png" alt="Cynthia_sas_0-1610139259102.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 20:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710280#M24790</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-01-08T20:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710304#M24791</link>
      <description>&lt;P&gt;Very elegant clarification&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; Just reading proc report book by author Jane Eslinger . I wonder whether salaryplus or Line is even needed-&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data salaries;
   input team $  type $ salary bonus;
   datalines;
Ben OFF 150000 5000
Tom OFF 200000 2000
Jerry OFF 140000 1500
Al DEF 80000 1000
Bill DEF 90000 2000
;
	run;

proc report data=salaries;
	column type team salary  bonus;
	define type / order 'Type';
	define team / display;
	define bonus / analysis format=dollar32.2 sum;
	define salary / analysis format=dollar32.2 sum;
	
	break after type / summarize
		style=[font_weight=bold background=lightgray];

	compute after type ;
			Type='Total ';
           salary.sum=bonus.sum+salary.sum;
		   bonus.sum=.;
	endcomp;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Type&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;team&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;salary&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;bonus&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;DEF&lt;/TD&gt;
&lt;TD class="l data"&gt;Al&lt;/TD&gt;
&lt;TD class="r data"&gt;$80,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$1,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Bill&lt;/TD&gt;
&lt;TD class="r data"&gt;$90,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$2,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;Total&lt;/TD&gt;
&lt;TD class="c dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$173,000.00&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;OFF&lt;/TD&gt;
&lt;TD class="l data"&gt;Ben&lt;/TD&gt;
&lt;TD class="r data"&gt;$150,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$5,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Tom&lt;/TD&gt;
&lt;TD class="r data"&gt;$200,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$2,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Jerry&lt;/TD&gt;
&lt;TD class="r data"&gt;$140,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$1,500.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;Total&lt;/TD&gt;
&lt;TD class="c dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$498,500.00&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Jan 2021 21:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710304#M24791</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-01-08T21:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710309#M24792</link>
      <description>&lt;P&gt;I updated the code, and we're getting the log below and still null values in the report.&amp;nbsp; The log is below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc report data=salaries;
	column type team salary salary_saving bonus;
	define type / group 'Type';
	define team / display;
	define bonus / analysis format=dollar32.2 ;
	define salary / analysis format=dollar32.2 ;
	define salary_saving / computed noprint ;
	
	compute salary_saving;
		salary_saving = bonus.sum+salary.sum;
	endcomp;

	break after type / summarize
		style=[font_weight=bold background=lightgray];

	compute after type ;
			line 'Total ' salary_saving ;
	endcomp;


run;
quit;&lt;/PRE&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;NOTE: Groups are not created because the usage of team is DISPLAY. To avoid this note, change all GROUP variables to ORDER 
variables.
NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      7 at 1:27   
NOTE: There were 5 observations read from the data set WORK.SALARIES.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jan 2021 21:52:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710309#M24792</guid>
      <dc:creator>vincent_s_jones</dc:creator>
      <dc:date>2021-01-08T21:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710311#M24793</link>
      <description>&lt;P&gt;Just wanted to point out that we're trying to get the results&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snapshot.jpg" style="width: 323px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53347iDAC9368072B1BFC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="snapshot.jpg" alt="snapshot.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it should read $200,000&lt;/P&gt;&lt;P&gt;and $498,500.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 21:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710311#M24793</guid>
      <dc:creator>vincent_s_jones</dc:creator>
      <dc:date>2021-01-08T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710314#M24794</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7930"&gt;@vincent_s_jones&lt;/a&gt;&amp;nbsp; Can you review the below-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data salaries;
   input team $  type $ salary bonus;
   datalines;
Ben OFF 150000 5000
Tom OFF 200000 2000
Jerry OFF 140000 1500
Al DEF 80000 1000
Bill DEF 90000 2000
;
	run;

proc report data=salaries;
	column type team salary  bonus total;
	define type / order 'Type';
	define team / display;
	define bonus / analysis format=dollar32.2 sum;
	define salary / analysis format=dollar32.2 sum;
	define total/computed noprint  ;
	break after type / summarize
		style=[font_weight=bold background=lightgray];

	compute after type ;
	  total=salary.sum+bonus.sum;
	  line 'Total' total dollar32.2;
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Type&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;team&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;salary&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;bonus&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;DEF&lt;/TD&gt;
&lt;TD class="l data"&gt;Al&lt;/TD&gt;
&lt;TD class="r data"&gt;$80,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$1,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Bill&lt;/TD&gt;
&lt;TD class="r data"&gt;$90,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$2,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;DEF&lt;/TD&gt;
&lt;TD class="c dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$170,000.00&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$3,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="4" class="c linecontent"&gt;Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$173,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;OFF&lt;/TD&gt;
&lt;TD class="l data"&gt;Ben&lt;/TD&gt;
&lt;TD class="r data"&gt;$150,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$5,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Tom&lt;/TD&gt;
&lt;TD class="r data"&gt;$200,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$2,000.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Jerry&lt;/TD&gt;
&lt;TD class="r data"&gt;$140,000.00&lt;/TD&gt;
&lt;TD class="r data"&gt;$1,500.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;OFF&lt;/TD&gt;
&lt;TD class="c dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$490,000.00&lt;/TD&gt;
&lt;TD class="r dataemphasis" style="font-weight: bold; background-color: #d3d3d3;"&gt;$8,500.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="4" class="c linecontent"&gt;Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$498,500.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 22:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710314#M24794</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-01-08T22:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710315#M24795</link>
      <description>Yes, and success! I will review my code to see where I went off the course. Thanks so much!</description>
      <pubDate>Fri, 08 Jan 2021 22:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710315#M24795</guid>
      <dc:creator>vincent_s_jones</dc:creator>
      <dc:date>2021-01-08T22:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create groupings from computed variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710316#M24796</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7930"&gt;@vincent_s_jones&lt;/a&gt;&amp;nbsp; I just checked your code, and have corrected yours too-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc report data=salaries;
	column type team salary salary_saving bonus;
	define type / group 'Type';
	define team / display;
	define bonus / analysis format=dollar32.2 ;
	define salary / analysis format=dollar32.2 ;
	define salary_saving / computed noprint ;
	
	compute bonus;
		salary_saving = bonus.sum+salary.sum;
	endcomp;

	break after type / summarize
		style=[font_weight=bold background=lightgray];

	compute after type ;
			line 'Total ' salary_saving ;
	endcomp;


run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is in your COMPUTE Salarysavings block. NOTE: Bonus values are not available yet. So you may have to move your salarysavings after bonus in column statement or use bonus in your compute block-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This is the culprit&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;compute salary_saving;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;salary_saving = bonus.sum+salary.sum;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;endcomp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;This is the correction:-&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;compute bonus;&lt;/FONT&gt;&lt;BR /&gt;salary_saving = bonus.sum+salary.sum;&lt;BR /&gt;&lt;FONT color="#339966"&gt;endcomp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&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;</description>
      <pubDate>Fri, 08 Jan 2021 23:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Trying-to-create-groupings-from-computed-variables/m-p/710316#M24796</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-01-08T23:57:49Z</dc:date>
    </item>
  </channel>
</rss>

