<?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 a total row at the end of data, but keep dates in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853161#M41974</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;The only issue I am having is that one of my columns is a date (in date 8 format) and i want to maintain this same date in the total "Overall" row.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;I don't really know what "maintain" means in this sentence.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jan 2023 21:02:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-01-10T21:02:52Z</dc:date>
    <item>
      <title>How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853156#M41973</link>
      <description>&lt;P&gt;Hello all I have used to following code to add a row at the end of my data that totals the columns of data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*creating total row at bottom of data*/&lt;BR /&gt;proc means noprint data=c_&amp;amp;i.;&lt;/P&gt;&lt;P&gt;output out=summary_&amp;amp;i. sum=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want_&amp;amp;i.;&lt;/P&gt;&lt;P&gt;set c_&amp;amp;i. summary_&amp;amp;i. (in=in2);&lt;/P&gt;&lt;P&gt;if in2 then program_description='Overall';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following article/question is where i found this solution:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Insert-a-Row-at-the-end-of-the-data-with-totals/td-p/136539" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Insert-a-Row-at-the-end-of-the-data-with-totals/td-p/136539&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only issue I am having is that one of my columns is a date (in date 8 format) and i want to maintain this same date in the total "Overall" row. currently it is totaling the dates and providing that value. is there a way to do this? if so what would be the most efficient way?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 20:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853156#M41973</guid>
      <dc:creator>AustinHarris</dc:creator>
      <dc:date>2023-01-10T20:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853161#M41974</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;The only issue I am having is that one of my columns is a date (in date 8 format) and i want to maintain this same date in the total "Overall" row.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;I don't really know what "maintain" means in this sentence.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 21:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853161#M41974</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-10T21:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853165#M41975</link>
      <description>&lt;P&gt;for instance, in the picture below, I want the date to remain 01/03/202. As opposed to being a sum of the dates.&amp;nbsp;&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="AustinHarris_1-1673384805464.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79258i5ACBDB7141BCF184/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinHarris_1-1673384805464.png" alt="AustinHarris_1-1673384805464.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 21:07:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853165#M41975</guid>
      <dc:creator>AustinHarris</dc:creator>
      <dc:date>2023-01-10T21:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853166#M41976</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input a b ;
date = today() - _N_;
format date yymmdd10.;
cards;
1 4
1 5
1 6
2 5
2 9
2 10
;
run;

proc print data=have;
run;

proc means noprint data=have;
  output out=summary sum(a b)= max(date)=;
run;

data want;
set have summary (in=in2);
if in2 then program_description='Overall';
run;


proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 21:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853166#M41976</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-01-10T21:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853167#M41977</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means noprint data=c_&amp;amp;i.;
    output out=summary_&amp;amp;i. sum= max(scoring_sample_date)=max_scoring_sample_date;
run;

data want_&amp;amp;i.;
    set c_&amp;amp;i. summary_&amp;amp;i. (in=in2);
    if in2 then do;
        program_description='Overall';
        scoring_sample_date=max_scoring_sample_date
    end;
    drop max_scoring_sample_date;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2023 21:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853167#M41977</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-10T21:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853799#M42010</link>
      <description>&lt;P&gt;I am receiving a syntax error.&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="AustinHarris_0-1673639181966.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79387i9811F9872455ED44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinHarris_0-1673639181966.png" alt="AustinHarris_0-1673639181966.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 19:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853799#M42010</guid>
      <dc:creator>AustinHarris</dc:creator>
      <dc:date>2023-01-13T19:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853815#M42011</link>
      <description>&lt;P&gt;Posting partial log screenshots isn't helpful as we can't see what has happened before. Please post your complete log using copy and paste and the &amp;lt;/&amp;gt; icon, not a screenshot.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 21:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853815#M42011</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-01-13T21:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853818#M42013</link>
      <description>It's missing a semicolon before the END statement.</description>
      <pubDate>Fri, 13 Jan 2023 21:33:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853818#M42013</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-01-13T21:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853819#M42014</link>
      <description>&lt;P&gt;Appending a "total" row to a dataset makes no sense. The dataset will become mostly unusable for further analysis, and reporting procedures can create such rows anyway.&lt;/P&gt;
&lt;P&gt;Please post usable example data (in a data step with datalines), and the report you want to create from it.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 21:33:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853819#M42014</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-01-13T21:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a total row at the end of data, but keep dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853855#M42016</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/438359"&gt;@AustinHarris&lt;/a&gt;&amp;nbsp;Short answer is: DON'T!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a bad idea to add total rows to data (tables). That's what you're doing in reports and many of the SAS procedures creating such reports allow for creation of totals (=collapsing categorial data). Same is true for any VA reporting. You want all your source data in your table to be on the same detail level as else any coding will become harder.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jan 2023 02:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-insert-a-total-row-at-the-end-of-data-but-keep-dates/m-p/853855#M42016</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-01-14T02:57:58Z</dc:date>
    </item>
  </channel>
</rss>

