<?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: insert total end of the table for multiple variables total in datastep in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/insert-total-end-of-the-table-for-multiple-variables-total-in/m-p/886082#M350156</link>
    <description>&lt;P&gt;PROC REPORT will do this for you, and on top of it from the original long dataset, without the need to transpose to wide. No need to trouble yourself with a DATA step.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2023 12:52:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-07-24T12:52:40Z</dc:date>
    <item>
      <title>insert total end of the table for multiple variables total in datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/insert-total-end-of-the-table-for-multiple-variables-total-in/m-p/886051#M350150</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ss;
input  jan  feb mar;
datalines;
  200 500 650
  255 255 550
 400 844 666
 410 500 600
;
run;



data want;
	set ss end=last;
	jan_sum+jan;
	feb_sum+feb;
	mar_sum+mar;
	output;

	if last then   do;
		
			Total='Total';
			jan=jan_sum;
			feb=feb_sum;
			mar=mar_sum;
			
			output; drop jan_sum feb_sum mar_sum ;
		end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;how to insert Total end of the table for all months total using datastep&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 09:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/insert-total-end-of-the-table-for-multiple-variables-total-in/m-p/886051#M350150</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2023-07-24T09:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: insert total end of the table for multiple variables total in datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/insert-total-end-of-the-table-for-multiple-variables-total-in/m-p/886082#M350156</link>
      <description>&lt;P&gt;PROC REPORT will do this for you, and on top of it from the original long dataset, without the need to transpose to wide. No need to trouble yourself with a DATA step.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 12:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/insert-total-end-of-the-table-for-multiple-variables-total-in/m-p/886082#M350156</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-07-24T12:52:40Z</dc:date>
    </item>
  </channel>
</rss>

