<?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: The variable type of 'AGE.sum'n is invalid in this context in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250777#M56620</link>
    <description>&lt;P&gt;I Dont have AGE.sum as variable, but i want it to calculate 0.69 *age(sum of age)&lt;/P&gt;&lt;P&gt;is it possible?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Feb 2016 07:43:45 GMT</pubDate>
    <dc:creator>imdickson</dc:creator>
    <dc:date>2016-02-18T07:43:45Z</dc:date>
    <item>
      <title>The variable type of 'AGE.sum'n is invalid in this context</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250773#M56617</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;Been using the drag and drop to do reporting...wanna try learning coding part, read some guides in google and followed some guides. but i am getting some error.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;so here is my code:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;proc&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;report&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;Headline&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;nowd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=education003v5rightj &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;OUT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=REPORTEDUCATION003 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;/*(KEEP=Age StartYear)*/&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;SPLIT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'*'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;title&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'1st Proc Report'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;COLUMN&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Age StartYear University Yandhi;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DEFINE&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Age /&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DISPLAY&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;ORDER&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'Years/Wasted in life'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DEFINE&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;StartYear /&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DISPLAY&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;"Commence Year"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;WIDTH&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;10&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;LEFT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DEFINE&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;University /&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DISPLAY&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#008000"&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;/*"Your Uni"*/&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;WIDTH&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;5&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;FLOW&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'*Note*'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DEFINE&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Yandhi / &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;COMPUTED&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'Yandhi and Nathan'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;7.3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;compute&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Yandhi;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Yandhi = &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;0.69&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;*Age.sum;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;endcomp&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;/*BREAK AFTER age / SUMMARIZE;*/&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;run;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;Im getting this error:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;The variable type of 'AGE.sum'n is invalid in this context&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;and secondly, i read online that the split option will split if i have a * but so far it doesnt have any effect on me...am i doing something wrong?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 07:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250773#M56617</guid>
      <dc:creator>imdickson</dc:creator>
      <dc:date>2016-02-18T07:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: The variable type of 'AGE.sum'n is invalid in this context</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250774#M56618</link>
      <description>&lt;P&gt;Do you have a column named 'age.sum'n in your dataset? I guess not. Did you mean to simply use age instead in your calculation?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 07:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250774#M56618</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-18T07:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: The variable type of 'AGE.sum'n is invalid in this context</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250777#M56620</link>
      <description>&lt;P&gt;I Dont have AGE.sum as variable, but i want it to calculate 0.69 *age(sum of age)&lt;/P&gt;&lt;P&gt;is it possible?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 07:43:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250777#M56620</guid>
      <dc:creator>imdickson</dc:creator>
      <dc:date>2016-02-18T07:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: The variable type of 'AGE.sum'n is invalid in this context</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250787#M56622</link>
      <description>&lt;P&gt;Yes. You can do it .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class nowd;
columns name sex age Yandhi;
define name/display;
define sex/display;
define age/analysis sum;
define Yandhi/computed;

compute before;
Age_sum=Age.sum;
endcomp;
compute Yandhi;
Yandhi = 0.69*Age_sum;
endcomp;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Feb 2016 09:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250787#M56622</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-18T09:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: The variable type of 'AGE.sum'n is invalid in this context</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250788#M56623</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried putting "analysis" for age:&lt;/P&gt;
&lt;PRE&gt;title'1st Proc Report';

proc report data=education003v5rightj out=reporteducation003 headline nowd split='*';
  column age startyear university yandhi;
  define age        / analysis 'Years/wasted in life' order;
  define startyear  / display "Commence year" width=10 left;
  define university / display  '*note*' width=5 flow;
  define yandhi     / computed 'Yandhi and Nathan' format=7.3;
  compute yandhi;
    yandhi = 0.69*age.sum;
  endcomp;
run;&lt;/PRE&gt;
&lt;P&gt;Now I don;t have any test data to try it out, but something like that should work, and here is a helpful doc showing some examples:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi27/p120-27.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi27/p120-27.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note, there is a {i} above where you post, this is to add code and keeps fomatting. &amp;nbsp;Please try to keep same capitiliasation in your programming, indentations matching - its far more important to write programs which other people can easily read.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 09:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/250788#M56623</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-02-18T09:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: The variable type of 'AGE.sum'n is invalid in this context</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/435151#M68935</link>
      <description>&lt;P&gt;My goal is to suppress one of the columns nested inside an across variable in PROC REPORT, conditional on a specified value of the across variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To understand this, I used the sashelp.class dataset.&amp;nbsp; I limited age to LE 12 so that only ages 11 and 12 would display.&amp;nbsp; age is also the across variable and nested within age are sex, weight, and height.&amp;nbsp; For this example, I want to "noprint"/suppress/hide the sex column when the age across variable = 11, but otherwise print the sex column for the other columns (age=12 for this example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What follows is the code I wrote to try to accomplish this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowd;&lt;BR /&gt;column name age,(sex weight height) age=agecat dummyvar;&lt;BR /&gt;define name/order;&lt;BR /&gt;define age/ across;&lt;BR /&gt;define agecat/analysis sum;&lt;BR /&gt;define sex/across;&lt;BR /&gt;define weight/display;&lt;BR /&gt;define height/display;&lt;BR /&gt;define dummyvar/noprint;&lt;BR /&gt;compute dummyvar;&lt;/P&gt;&lt;P&gt;dummyvar=1;&lt;/P&gt;&lt;P&gt;if agecat.sum&amp;lt;12 then do;&lt;/P&gt;&lt;P&gt;call define ("_c2_","style","style={width=0}");&lt;/P&gt;&lt;P&gt;call define ("_c3_","style","style=[width=0]");&lt;/P&gt;&lt;P&gt;end;&lt;BR /&gt;endcomp;&lt;BR /&gt;where&amp;nbsp; age&amp;lt;=12;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my log displays the following messages:&lt;/P&gt;&lt;P&gt;ERROR: The variable type of AGECAT.SUM is invalid in this context.&lt;BR /&gt;NOTE: The preceding messages refer to the COMPUTE block for dummyvar.&lt;BR /&gt;NOTE: Will not run due to compilation errors.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 7 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE age&amp;lt;=12;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is what I am trying to accomplish possible? If so, could some one provide code that could accomplish my objective? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 02:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/435151#M68935</guid>
      <dc:creator>Varrelle</dc:creator>
      <dc:date>2018-02-08T02:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: The variable type of 'AGE.sum'n is invalid in this context</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/435192#M68938</link>
      <description>&lt;P&gt;Please start a new thread with your question, this thread is a couple of years old.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 08:58:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/The-variable-type-of-AGE-sum-n-is-invalid-in-this-context/m-p/435192#M68938</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-08T08:58:56Z</dc:date>
    </item>
  </channel>
</rss>

