<?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: How to insert subtotal and total in dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384559#M91846</link>
    <description>&lt;P&gt;Examine the data set that comes out of this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc summary data=have;&lt;/P&gt;
&lt;P&gt;class product;&lt;/P&gt;
&lt;P&gt;var amount;&lt;/P&gt;
&lt;P&gt;output out=stats sum=;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will contain what you ask, but you will need to study a little to figure out the various pieces of the output. &amp;nbsp;If you want to use SAS, this is a tool you must master.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2017 11:25:54 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-08-01T11:25:54Z</dc:date>
    <item>
      <title>How to insert subtotal and total in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384534#M91838</link>
      <description>&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;In a dataset containing sales data with three different products on daily basis.&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;&lt;FONT face="arial black,avant garde"&gt;I want to calculate sales subtotal for each of the product grand total&lt;FONT size="3" color="#FFCC00"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;FONT size="3" color="#FFCC00"&gt;Looking for SAS code.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 08:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384534#M91838</guid>
      <dc:creator>Naveen45</dc:creator>
      <dc:date>2017-08-01T08:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert subtotal and total in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384535#M91839</link>
      <description>&lt;P&gt;Follow the guidance below the Post button - post example test data in the form of a datastep, use the {i} button above the post area to post code to retain formatting. &amp;nbsp;Show what you want out at the end. &amp;nbsp;Show logs/code you have done and where you are having diccifulties. &amp;nbsp;Avoid writing in bold an mixed colors. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do subtotals, you have several options, proc means, summary, proc sql sum() group by, datastep retain count variable. &amp;nbsp;They are each useful in different scenarios.&lt;/P&gt;
&lt;P&gt;Finally this a Q&amp;amp;A forum not a contract work request page.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 08:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384535#M91839</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-08-01T08:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert subtotal and total in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384559#M91846</link>
      <description>&lt;P&gt;Examine the data set that comes out of this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc summary data=have;&lt;/P&gt;
&lt;P&gt;class product;&lt;/P&gt;
&lt;P&gt;var amount;&lt;/P&gt;
&lt;P&gt;output out=stats sum=;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will contain what you ask, but you will need to study a little to figure out the various pieces of the output. &amp;nbsp;If you want to use SAS, this is a tool you must master.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 11:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384559#M91846</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-08-01T11:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert subtotal and total in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384725#M91933</link>
      <description>Please don't store totals in a data set unless its only use will be for 1-1 report display.&lt;BR /&gt;Procedures like TABULATE and REPORT has this OOTB.</description>
      <pubDate>Tue, 01 Aug 2017 18:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-insert-subtotal-and-total-in-dataset/m-p/384725#M91933</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-08-01T18:56:51Z</dc:date>
    </item>
  </channel>
</rss>

