<?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 report - Why Alias necessary? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-report-Why-Alias-necessary/m-p/838582#M331555</link>
    <description>&lt;P&gt;With a non-aliqsed analysis variable, you need to also use the required statistic:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value form 
  0, . ='-' 
  other=[numx15.]
;
run;

proc report data=sashelp.cars;
columns origin make msrp invoice test;
define origin/group;
define make/group;
define msrp / analysis format=form.;
define invoice / analysis format=form.;
define test/ computed format=form.;
compute test;
  test = invoice.sum + msrp.sum;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Oct 2022 08:38:03 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-10-14T08:38:03Z</dc:date>
    <item>
      <title>proc report - Why Alias necessary?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-Why-Alias-necessary/m-p/838581#M331554</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to compute a column within a proc-report-step. My question: Why is it necessary, to use aliases, if I want to calculate with two existing variables? For example:&lt;/P&gt;
&lt;P&gt;In example &lt;STRONG&gt;#1 &lt;/STRONG&gt;I tried to summarize invoice and msrp. That doesnt work.&lt;/P&gt;
&lt;P&gt;In example &lt;STRONG&gt;#2&lt;/STRONG&gt; I gave these both variables aliases and referenced in the further steps always to these aliases. That works. But: Why? What is the background of these rule?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;#1&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;proc format;
  value form 
  0, . ='-' other=[numx.15];
  run;

proc report data=sashelp.cars;
columns origin make msrp invoice test;
define origin/group;
define make/group;
define msrp / analysis format=form.;
define invoice / analysis format=form.;
define test/ computed format=form.;
compute test;
	test=invoice+msrp;
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;STRONG&gt;#2&lt;/STRONG&gt;&lt;BR /&gt;proc report data=sashelp.cars;
columns origin make &lt;U&gt;msrp=ms invoice=inv&lt;/U&gt; test;
define origin/group;
define make/group;
define test/ computed format=form.;
define ms / analysis format=form.;
define inv / analysis format=form.;
compute test;
	test=inv+ms;
	endcomp;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Oct 2022 07:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-Why-Alias-necessary/m-p/838581#M331554</guid>
      <dc:creator>Konkordanz</dc:creator>
      <dc:date>2022-10-14T07:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - Why Alias necessary?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-Why-Alias-necessary/m-p/838582#M331555</link>
      <description>&lt;P&gt;With a non-aliqsed analysis variable, you need to also use the required statistic:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value form 
  0, . ='-' 
  other=[numx15.]
;
run;

proc report data=sashelp.cars;
columns origin make msrp invoice test;
define origin/group;
define make/group;
define msrp / analysis format=form.;
define invoice / analysis format=form.;
define test/ computed format=form.;
compute test;
  test = invoice.sum + msrp.sum;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Oct 2022 08:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-Why-Alias-necessary/m-p/838582#M331555</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-14T08:38:03Z</dc:date>
    </item>
  </channel>
</rss>

