<?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: Dividing summary statistic by 1 million in Proc Summary Step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487197#M287257</link>
    <description>&lt;P&gt;Can you apply a format to the results instead to scale the results?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77069"&gt;@Terho&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using a proc summary step to summarize my data.&lt;/P&gt;
&lt;P&gt;However, I want to divide the summary statistics in the "VAR" statement below by 1,000,000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SUMMARY DATA=ExecSummary nway missing;&lt;BR /&gt;CLASS&lt;BR /&gt;JOBID&lt;BR /&gt;PERIOD_ID&lt;BR /&gt;SCENARIO;&lt;BR /&gt;VAR&lt;BR /&gt;RQ01&lt;BR /&gt;RQ02&lt;BR /&gt;NCO_9Q&lt;BR /&gt;NCO_13Q&lt;BR /&gt;;&lt;BR /&gt;OUTPUT out=ExecOutput (drop=_FREQ_ _TYPE_) sum=;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anyway to divide the summary statistics by 1 million directly in the proc summary step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Aug 2018 20:45:22 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-08-15T20:45:22Z</dc:date>
    <item>
      <title>Dividing summary statistic by 1 million in Proc Summary Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487189#M287256</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a proc summary step to summarize my data.&lt;/P&gt;&lt;P&gt;However, I want to divide the summary statistics in the "VAR" statement below by 1,000,000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SUMMARY DATA=ExecSummary nway missing;&lt;BR /&gt;CLASS&lt;BR /&gt;JOBID&lt;BR /&gt;PERIOD_ID&lt;BR /&gt;SCENARIO;&lt;BR /&gt;VAR&lt;BR /&gt;RQ01&lt;BR /&gt;RQ02&lt;BR /&gt;NCO_9Q&lt;BR /&gt;NCO_13Q&lt;BR /&gt;;&lt;BR /&gt;OUTPUT out=ExecOutput (drop=_FREQ_ _TYPE_) sum=;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to divide the summary statistics by 1 million directly in the proc summary step?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487189#M287256</guid>
      <dc:creator>Terho</dc:creator>
      <dc:date>2018-08-15T20:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing summary statistic by 1 million in Proc Summary Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487197#M287257</link>
      <description>&lt;P&gt;Can you apply a format to the results instead to scale the results?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77069"&gt;@Terho&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using a proc summary step to summarize my data.&lt;/P&gt;
&lt;P&gt;However, I want to divide the summary statistics in the "VAR" statement below by 1,000,000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SUMMARY DATA=ExecSummary nway missing;&lt;BR /&gt;CLASS&lt;BR /&gt;JOBID&lt;BR /&gt;PERIOD_ID&lt;BR /&gt;SCENARIO;&lt;BR /&gt;VAR&lt;BR /&gt;RQ01&lt;BR /&gt;RQ02&lt;BR /&gt;NCO_9Q&lt;BR /&gt;NCO_13Q&lt;BR /&gt;;&lt;BR /&gt;OUTPUT out=ExecOutput (drop=_FREQ_ _TYPE_) sum=;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anyway to divide the summary statistics by 1 million directly in the proc summary step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:45:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487197#M287257</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-15T20:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing summary statistic by 1 million in Proc Summary Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487198#M287258</link>
      <description>&lt;P&gt;You could do make a weight variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data need / view=need;
  set execsummary;
  _wgt=1/1000000;
run;

PROC SUMMARY DATA=need nway missing;
  CLASS  JOBID  PERIOD_ID  SCENARIO;
  VAR  RQ01  RQ02  NCO_9Q  NCO_13Q ;
  weight _wgt; 
  OUTPUT out=ExecOutput (drop=_FREQ_ _TYPE_) sum=;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is not much efficiency loss here, since NEED is a data set view, not a data set file.&amp;nbsp; NEED will be activated only when called by the proc summary, and will stream its data to the proc, not to disk storage.&amp;nbsp; So virtually no input/output cost.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:47:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487198#M287258</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-08-15T20:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing summary statistic by 1 million in Proc Summary Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487212#M287259</link>
      <description>&lt;P&gt;Thank you! This worked wonderfully!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 21:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-summary-statistic-by-1-million-in-Proc-Summary-Step/m-p/487212#M287259</guid>
      <dc:creator>Terho</dc:creator>
      <dc:date>2018-08-15T21:31:16Z</dc:date>
    </item>
  </channel>
</rss>

