<?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 Colum Reference in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737859#M230074</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/338611"&gt;@VCucu&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;i dont get any error using the syntax above. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; what do you mean ?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I mean use the EXACT code I provided.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, if you don't get a syntax error and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;does using the code you provided, then it would seem that you are not running the exact code you showed us. That makes it difficult (if not impossible) for us to help.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 12:28:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-04-29T12:28:52Z</dc:date>
    <item>
      <title>Proc Report Colum Reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737844#M230063</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following code for a proc report:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title1 "Table1"; 
proc report data=r12 nowd list headline headskip spacing=2 split='~' contents='';
column  (num_mandant value dax_Generation, (metric_sum Dev1 dev2 dev3 dev4));
define num_mandant / group 'Mandant Code';
define value / group 'Basel COREP Exposure Class';
define dax_generation / across 'Time Period';
define metric_sum / sum  f=comma20. 'Exposure Book Value Amount';
define dev1 / computed nozero f=percent9.1 style=[backgroundcolor=color.]  'vs M-1.~(%)';
define dev2 / computed nozero format=comma20.1 'vs. M-1~(EUR mn.)';
define dev3 / computed nozero f=percent9.1 style=[backgroundcolor=color.]  'vs. M-2~(%)';
define dev4 / computed nozero format=comma20.1 'vs. M-2~(EUR mn.)';
compute dev1;
_c14_=_c13_/_c8_-1;
endcomp;
compute dev2;
_c15_=(_c13_-_c8_)/1000000;
endcomp;
compute dev3;
_c16_=_c13_/_c3_-1;
endcomp;
compute dev4;
_c17_=(_c13_-_c3_)/1000000;
endcomp;
compute value;
call define(_col_,'url',"M:\OE0979\SPR\reporta_&amp;amp;md._analysis12_"||trim(value)||".html"); 
endcomp;
rbreak after / summarize style=[font_weight=bold];
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This basically produces a hyperlink in the 2nd column as seen below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VCucu_0-1619692914061.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58847i76F4A18EDA9CBA4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VCucu_0-1619692914061.png" alt="VCucu_0-1619692914061.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would like to produce the hyperlink only if _col13_&amp;gt;10.000.000 and abs(_col14_)&amp;gt;0.1&lt;/P&gt;
&lt;P&gt;I tried to use the following code but it stil creates hyperlinks for all values:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compute value;
if _C13_&amp;gt;10000000 abs(_c14_)&amp;gt;0.1 then call define(_col_,'url',"M:\OE0979\SPR\reporta_&amp;amp;md._analysis12_"||trim(value)||".html"); 
endcomp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What should i change ?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 10:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737844#M230063</guid>
      <dc:creator>VCucu</dc:creator>
      <dc:date>2021-04-29T10:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Colum Reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737846#M230064</link>
      <description>&lt;P&gt;Start by using proper syntax in your IF&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if _C13_&amp;gt;10000000 and abs(_c14_)&amp;gt;0.1 then call define(_col_,'url',"M:\OE0979\SPR\reporta_&amp;amp;md._analysis12_"||trim(value)||".html"); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 10:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737846#M230064</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-04-29T10:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Colum Reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737847#M230065</link>
      <description>i dont get any error using the syntax above. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; what do you mean ?</description>
      <pubDate>Thu, 29 Apr 2021 10:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737847#M230065</guid>
      <dc:creator>VCucu</dc:creator>
      <dc:date>2021-04-29T10:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Colum Reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737858#M230073</link>
      <description>&lt;P&gt;I seriously doubt that. Code in a COMPUTE has to be valid DATA step code:&lt;/P&gt;
&lt;PRE&gt; 73         data _null_;
 74         _c13_ = 1000000000000;
 75         _c14_ = 1;
 76         if _C13_&amp;gt;10000000 abs(_c14_)&amp;gt;0.1 then put "Yes";
                              ___
                              22
 ERROR 22-322: Syntaxfehler, erwartet wird eines der folgenden: !, !!, &amp;amp;, *, **, +, -, /, ;, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, 
               GT, LE, LT, MAX, MIN, NE, NG, NL, OR, ^=, |, ||, ~=.  
&lt;/PRE&gt;
&lt;P&gt;There must be and AND or OR where the ERROR indicator points to.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 11:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737858#M230073</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-04-29T11:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Colum Reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737859#M230074</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/338611"&gt;@VCucu&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;i dont get any error using the syntax above. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; what do you mean ?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I mean use the EXACT code I provided.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, if you don't get a syntax error and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;does using the code you provided, then it would seem that you are not running the exact code you showed us. That makes it difficult (if not impossible) for us to help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 12:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/737859#M230074</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-04-29T12:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Colum Reference</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/738110#M230189</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for all that. Now i get it, i will always include a small code example. Please see below example code.&lt;/P&gt;
&lt;PRE&gt;DATA report;
 INPUT mandant generation metric$ customer$ sum;
CARDS;
196 202104 sales AAA 100
196 202104 sales BBB 95
196 202104 sales CCC 80
196 202103 sales AAA 90
196 202103 sales BBB 90
196 202103 sales CCC 90
196 202102 sales AAA 90
196 202102 sales BBB 90
196 202102 sales CCC 90
;
RUN; 

proc format;
   value color -10-&amp;lt;-0.1='red' -0.1-&amp;lt;-0.05='yellow' -0.05-&amp;lt;0.05='green' 0.05-&amp;lt;0.1='yellow' 0.1-&amp;lt;10='red';
           

proc report data=report nowd list headline headskip spacing=2 split='~' contents='';
column  (mandant customer Generation, (sum Dev1 dev2 dev3 dev4));
define mandant / group 'Mandant Code';
define customer / group 'Customer';
define generation / across 'Time Period';
define sum / sum  f=comma20. 'Amount';
define dev1 / computed nozero f=percent9.1 style=[backgroundcolor=color.]  'vs M-1.~(%)';
define dev2 / computed nozero format=comma20.1 'vs. M-1~ (Amount)';
define dev3 / computed nozero f=percent9.1 style=[backgroundcolor=color.]  'vs. M-2~(%)';
define dev4 / computed nozero format=comma20.1 'vs. M-2~ (Amount)';
compute dev1;
_c14_=_c13_/_c8_-1;
endcomp;
compute dev2;
_c15_=(_c13_-_c8_);
endcomp;
compute dev3;
_c16_=_c13_/_c3_-1;
endcomp;
compute dev4;
_c17_=(_c13_-_c3_);
endcomp;
compute customer;
if abs(_c15_)&amp;gt;5 then call define(_col_,'url',"M:\OE0979\SPR\test_"||trim(customer)||".html"); 
endcomp;
rbreak after / summarize style=[font_weight=bold];
run;&lt;/PRE&gt;
&lt;P&gt;I would like same as above to create this hyperlink only if for example abs(_c15_)&amp;gt;5 . If i use the code above it does not work... all the hyperlinks are dead.&lt;/P&gt;
&lt;P&gt;What am I doing wrong ? &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 08:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Colum-Reference/m-p/738110#M230189</guid>
      <dc:creator>VCucu</dc:creator>
      <dc:date>2021-04-30T08:35:24Z</dc:date>
    </item>
  </channel>
</rss>

