<?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: proc means - summary row renaming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-means-summary-row-renaming/m-p/423930#M104306</link>
    <description>&lt;P&gt;In SAS, rows don't have names.&amp;nbsp; What you will need to do is add a column to the output data set that you named DATA.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set data;&lt;/P&gt;
&lt;P&gt;if _n_=1 then row_name = 'Total';&lt;/P&gt;
&lt;P&gt;else row_name = put(_probability___, 5.);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then when you print the data set, you can print ROW_NAME instead of _PROBABILITY___.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Dec 2017 17:34:29 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-12-28T17:34:29Z</dc:date>
    <item>
      <title>proc means - summary row renaming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-summary-row-renaming/m-p/423927#M104305</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data = c1.od noprint nonobs;
var  Total_Media_Value ;
class _probability___/ descending;
output out=data (drop = _TYPE_ _FREQ_)
sum = Total_Budget
n= num_of_optys;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;in the output i am getting a row which gives me total of columns. I want to give&amp;nbsp; that row a name - Total , how do i do that?&lt;/P&gt;&lt;P&gt;eg- my result looks like this -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;probability&amp;nbsp; total budget&amp;nbsp; num&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1	.	3200531	361
2	100	68100	7
3	90	56000	4
4	70	23200	8
5	50	156500	18
6	30	112000	5
7	10	2784731	319&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV class=" dgrid-row dgrid-row-even ui-state-default"&gt;&lt;BR /&gt;i want the first row at the end and have it named total&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Dec 2017 17:11:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-summary-row-renaming/m-p/423927#M104305</guid>
      <dc:creator>riya275</dc:creator>
      <dc:date>2017-12-28T17:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - summary row renaming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-summary-row-renaming/m-p/423930#M104306</link>
      <description>&lt;P&gt;In SAS, rows don't have names.&amp;nbsp; What you will need to do is add a column to the output data set that you named DATA.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set data;&lt;/P&gt;
&lt;P&gt;if _n_=1 then row_name = 'Total';&lt;/P&gt;
&lt;P&gt;else row_name = put(_probability___, 5.);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then when you print the data set, you can print ROW_NAME instead of _PROBABILITY___.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 17:34:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-summary-row-renaming/m-p/423930#M104306</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-12-28T17:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - summary row renaming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-summary-row-renaming/m-p/424160#M104413</link>
      <description>&lt;P&gt;I guessed you only need the total sum.Add NWAY option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;means&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; c1&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;od noprint nonobs nway&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Dec 2017 11:24:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-summary-row-renaming/m-p/424160#M104413</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-12-31T11:24:42Z</dc:date>
    </item>
  </channel>
</rss>

