<?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: Summing variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Summing-variable/m-p/411404#M26425</link>
    <description>&lt;P&gt;Why not use one of the summary tasks?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, PROC MEANS and SUMMARY are also options to summarize your data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Create summary statistics for a dataset by a 'grouping' variable and store it in a dataset;

*Generate sample fake data;
data have;
	input ID          feature1         feature2         feature3;
	cards;
1               7.72               5.43              4.35
1               5.54               2.25              8.22 
1               4.43               6.75              2.22
1               3.22               3.21              7.31
2               6.72               2.86              6.11
2               5.89               4.25              5.25 
2               3.43               7.30              8.21
2               1.22               3.55              6.55

;
run;

*Create summary data;
proc means data=have noprint;
	by id;
	var feature1-feature3;
	output out=want median= var= mean= /autoname;
run;

*Show for display;
proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need more specific help, please post data as a data step, I'm not typing data from a picture.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nothing in your code shows you calculating a SUM either...&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 01:26:23 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-11-08T01:26:23Z</dc:date>
    <item>
      <title>Summing variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Summing-variable/m-p/411403#M26424</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture117.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16518i121C885A1B2E3CB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture117.png" alt="Untitled picture117.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Im pulling this table in SAS EG&amp;nbsp; and this is the code im using&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA DOV_NEW;&lt;BR /&gt;SET DOV_SUMM_RCOC;&lt;BR /&gt;IF RCOC_GRP = 'NEW' THEN;&lt;BR /&gt;DO;&lt;BR /&gt;TRIGGER = 1;&lt;BR /&gt;NUMERATOR = COUNTER;&lt;BR /&gt;DENOMINATOR = 1;&lt;BR /&gt;METRIC = 'NEW Apts ';&lt;BR /&gt;IF RCOC_GRP NE 'NEW' THEN DELETE;&lt;BR /&gt;KEEP RESID MTH_YR I FAC CLINIC HOME_DEPT TRIGGER NUMERATOR DENOMINATOR METRIC;&lt;BR /&gt;where resid= '2972926';&lt;BR /&gt;OUTPUT DOV_NEW;&lt;BR /&gt;END;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However I want to the sum the&amp;nbsp;&lt;SPAN&gt;NUMERATOR&amp;nbsp;for the same Mth-yr and Clinic but do not want to sum the&amp;nbsp;DENOMINATOR&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example line 26 and 27 have the same Mth_yr, clinic and etc but the FAC are different i want the sum of 26 and 27 to be 174 and denominator&amp;nbsp;to be just 1&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is that something i can do?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 01:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Summing-variable/m-p/411403#M26424</guid>
      <dc:creator>hk2013</dc:creator>
      <dc:date>2017-11-08T01:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Summing variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Summing-variable/m-p/411404#M26425</link>
      <description>&lt;P&gt;Why not use one of the summary tasks?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, PROC MEANS and SUMMARY are also options to summarize your data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Create summary statistics for a dataset by a 'grouping' variable and store it in a dataset;

*Generate sample fake data;
data have;
	input ID          feature1         feature2         feature3;
	cards;
1               7.72               5.43              4.35
1               5.54               2.25              8.22 
1               4.43               6.75              2.22
1               3.22               3.21              7.31
2               6.72               2.86              6.11
2               5.89               4.25              5.25 
2               3.43               7.30              8.21
2               1.22               3.55              6.55

;
run;

*Create summary data;
proc means data=have noprint;
	by id;
	var feature1-feature3;
	output out=want median= var= mean= /autoname;
run;

*Show for display;
proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need more specific help, please post data as a data step, I'm not typing data from a picture.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nothing in your code shows you calculating a SUM either...&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 01:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Summing-variable/m-p/411404#M26425</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-08T01:26:23Z</dc:date>
    </item>
  </channel>
</rss>

