<?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: Conditional Traffic Lighting Based on the Value of Another Variable in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140155#M11161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Cynthia that it took me so long to thank you for this. This is totally correct. Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 May 2014 22:29:24 GMT</pubDate>
    <dc:creator>Mgarret</dc:creator>
    <dc:date>2014-05-05T22:29:24Z</dc:date>
    <item>
      <title>Conditional Traffic Lighting Based on the Value of Another Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140150#M11156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hi all--&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I'm having some issues with with traffic lighting a variable based on the value of another variable.&amp;nbsp; I have two variables KPI and Lift.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 159px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="110"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;KPI&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="49"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;Lift&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;" width="110"&gt;&lt;SPAN style="color: #000000;"&gt;Response Rate&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;" width="49"&gt;&lt;SPAN style="color: #000000;"&gt;-20.38%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;" width="110"&gt;&lt;SPAN style="color: #000000;"&gt;Conversion Rate&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #000000;"&gt;N/A&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;" width="110"&gt;&lt;SPAN style="color: #000000;"&gt;Yield Rate&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #000000;"&gt;N/A&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;" width="110"&gt;&lt;SPAN style="color: #000000;"&gt;VideoQual RR&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;" width="49"&gt;&lt;SPAN style="color: #000000;"&gt;-22.10%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;" width="110"&gt;&lt;SPAN style="color: #000000;"&gt;Cost Per Response&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;" width="49"&gt;&lt;SPAN style="color: #000000;"&gt;29.72%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;" width="110"&gt;&lt;SPAN style="color: #000000;"&gt;Cost Per Sale&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #000000;"&gt;N/A&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Lift is a numeric variable but I have applied a format to it so if the cell is&amp;nbsp; missing (.) then N/A. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;1. For the rows in &lt;STRONG&gt;KPI&lt;/STRONG&gt; which contain 'Response Rate' 'Conversion Rate' 'Yield Rate' 'VideoQual RR' the traffic lighting should go like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;--If &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;lift&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; is greater than 0 then Green colored&amp;nbsp; font &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;--If &lt;STRONG&gt;lift &lt;/STRONG&gt;is less than 0 than red&amp;nbsp; colored&amp;nbsp; font &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;--if &lt;STRONG&gt;lift &lt;/STRONG&gt;is missing (.) then black&amp;nbsp; colored&amp;nbsp; font &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;2. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; For the rows in &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;KPI&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; which contain 'Cost Per Response' 'Cost Per Sale'&amp;nbsp; the traffic lighting should go like this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;--If &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt;"&gt;lift&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; is greater than 0 then red colored&amp;nbsp; font &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;--If &lt;STRONG&gt;lift &lt;/STRONG&gt;is less than 0 than green colored&amp;nbsp; font &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;--if &lt;STRONG&gt;lift &lt;/STRONG&gt;is missing (.) then black&amp;nbsp; colored&amp;nbsp; font &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;A&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;So the column lift should have two different conditional tragic lighting logic&amp;nbsp; applied. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;There is something up with my syntax&amp;nbsp; because I can't seem to get the missing(.)/N/A value black. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Below is my program.&amp;nbsp; Any assistance is appreciated. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;proc report data=Final nowd;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; column &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;KPI lift; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; define KPI / display&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; style(column)={ just=right&amp;nbsp; font_size=10pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD&amp;nbsp; cellwidth=1.4in}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; style(header)={ just=center font_size=10 pt font_face= 'Arial Narrow'&amp;nbsp; FONT_WEIGHT =BOLD background=cxcccccc};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; define lift&amp;nbsp; / display&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; style(column)={just=center font_size=10pt font_face= 'Arial Narrow'cellwidth=.7in}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; style(header)={just=center font_size=10 pt font_face= 'Arial Narrow'&amp;nbsp; FONT_WEIGHT =BOLD background=cxcccccc};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;compute lift;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' ' VideoQual RR') and lift &amp;lt; 0 then &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;call define(_col_,"style","style=[foreground=red]");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;else if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' 'VideoQual RR') and lift &amp;gt; 1 then &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;call define(_col_,"style","style=[foreground=green]");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;else if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' ' VideoQual RR') and&amp;nbsp; lift = . ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;call define(_col_,"style","style=[foreground=black]")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;else if KPI in('Cost Per Response' 'Cost Per Sale') and lift &amp;gt; 1 then &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;call define(_col_,"style","style=[foreground=red]");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;else if KPI in('Cost Per Response' 'Cost Per Sale') and lift &amp;lt; 0 then &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;call define(_col_,"style","style=[foreground=green]");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;else if KPI in('Cost Per Response' 'Cost Per Sale') and lift = .;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;call define(_col_,"style","style=[foreground=black]");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;endcomp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 19:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140150#M11156</guid>
      <dc:creator>Mgarret</dc:creator>
      <dc:date>2014-03-11T19:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Traffic Lighting Based on the Value of Another Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140151#M11157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your semicolon is in the wrong place and you're missing a then.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;else if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' ' VideoQual RR') and&amp;nbsp; lift = .&amp;nbsp; then&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;call define(_col_,"style","style=[foreground=black]");&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 21:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140151#M11157</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-11T21:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Traffic Lighting Based on the Value of Another Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140152#M11158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! I am still getting a funny output. It looks like this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 201px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="35" width="134"&gt;KPI&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="67"&gt;Lift&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;" width="134"&gt;Response Rate&lt;/TD&gt;&lt;TD class="xl69" style="border-top-style: none; border-left-style: none; color: #ff0000; text-align: left; padding: 0px; background-color: transparent; font-family: arial, helvetica, sans-serif; vertical-align: middle;" width="67"&gt;-20.38%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;" width="134"&gt;Conversion Rate&lt;/TD&gt;&lt;TD class="xl70" style="border-top-style: none; border-left-style: none; color: #ff0000; text-align: left; padding: 0px; background-color: transparent; font-family: arial, helvetica, sans-serif; vertical-align: middle;"&gt;N/A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;" width="134"&gt;Yield Rate&lt;/TD&gt;&lt;TD class="xl70" style="border-top-style: none; border-left-style: none; color: #ff0000; text-align: left; padding: 0px; background-color: transparent; font-family: arial, helvetica, sans-serif; vertical-align: middle;"&gt;N/A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;" width="134"&gt; VideoQual RR&lt;/TD&gt;&lt;TD class="xl69" style="border-top-style: none; border-left-style: none; color: #ff0000; text-align: left; padding: 0px; background-color: transparent; font-family: arial, helvetica, sans-serif; vertical-align: middle;" width="67"&gt;-22.10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;" width="134"&gt;Cost Per Response&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;" width="67"&gt;29.72%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;" width="134"&gt;Cost Per Sale&lt;/TD&gt;&lt;TD class="xl71" style="border-top-style: none; border-left-style: none; color: #008000; text-align: left; padding: 0px; background-color: transparent; font-family: arial, helvetica, sans-serif; vertical-align: middle;"&gt;N/A&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--N/A should be black&lt;/P&gt;&lt;P&gt;--Cost Per Response should be green. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data=Final nowd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; column &lt;/P&gt;&lt;P&gt;KPI Control Test lift Statistically_Significant_95 percent_Significant; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define KPI / display&lt;/P&gt;&lt;P&gt;&amp;nbsp; style(column)={ just=right&amp;nbsp; font_size=10pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD&amp;nbsp; cellwidth=1.4in}&lt;/P&gt;&lt;P&gt;&amp;nbsp; style(header)={ just=center font_size=10 pt font_face= 'Arial Narrow'&amp;nbsp; FONT_WEIGHT =BOLD background=cxcccccc};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define lift&amp;nbsp; / display&lt;/P&gt;&lt;P&gt;&amp;nbsp; style(column)={just=center font_size=10pt font_face= 'Arial Narrow'cellwidth=.7in}&lt;/P&gt;&lt;P&gt;&amp;nbsp; style(header)={just=center font_size=10 pt font_face= 'Arial Narrow'&amp;nbsp; FONT_WEIGHT =BOLD background=cxcccccc};&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;compute lift;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' 'VideoQual RR') and lift &amp;lt; 0 then &lt;/P&gt;&lt;P&gt;call define(_col_,"style","style=[foreground=red]");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' ' VideoQual RR') and lift &amp;gt; 1 then &lt;/P&gt;&lt;P&gt;call define(_col_,"style","style=[foreground=green]");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' ' VideoQual RR') and&amp;nbsp; lift = .&amp;nbsp; then&lt;/P&gt;&lt;P&gt;call define(_col_,"style","style=[foreground=black]");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if KPI in('Cost Per Response' 'Cost Per Sale') and lift &amp;gt; 1 then &lt;/P&gt;&lt;P&gt;call define(_col_,"style","style=[foreground=red]");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;else if KPI in('Cost Per Response' 'Cost Per Sale') and lift &amp;lt; 0 then &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;call define(_col_,"style","style=[foreground=green]");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;else if KPI in('Cost Per Response' 'Cost Per Sale') and&amp;nbsp; lift = .&amp;nbsp; then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;call define(_col_,"style","style=[foreground=black]");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;endcomp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 21:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140152#M11158</guid>
      <dc:creator>Mgarret</dc:creator>
      <dc:date>2014-03-11T21:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Traffic Lighting Based on the Value of Another Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140153#M11159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your percentages numbers like 45.2 or are they 0.452 formatted as percentages, and as such less than 1, between 0 and 1. &lt;/P&gt;&lt;P&gt;Also, the condition &amp;lt;0 will include missing observations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 22:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140153#M11159</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-11T22:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Traffic Lighting Based on the Value of Another Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140154#M11160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am not sure of your logic. In one post, you say that for Cost Per Response a LIFT of .2972, that the number should be Green, but you said&lt;/P&gt;&lt;P&gt;"2.&amp;nbsp; For the rows in KPI which contain 'Cost Per Response' 'Cost Per Sale'&amp;nbsp; the traffic lighting should go like this:&lt;/P&gt;&lt;P&gt;--&lt;STRONG&gt;If lift is greater than 0 then red colored&amp;nbsp; font&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;--If lift is less than 0 than green colored&amp;nbsp; font&lt;/P&gt;&lt;P&gt;--if lift is missing (.) then black&amp;nbsp; colored&amp;nbsp; font "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Whether the number is .2972 or 29.72, either of those numbers is GT 0. But,&amp;nbsp; according to your rules, that number for LIFT for Cost Per Response should be &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;RED&lt;/STRONG&gt;&lt;/SPAN&gt;, because both of those numbers are GT 0. .2972 is GT 0 but is LT 1 so if your number is .2972, that will be one problem, as Reeza pointed out. But you did not code GT 0 in your code, instead you coded GT 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; See the attached screen shot, that shows the results of running the code below. The DATA step program has 3 different logic scenarios -- it shows 2 things that could cause issues 1) putting the test for missing in the wrong place and 2) using GT 1 instead of GT 0. I made a subset of your data with just a few KPI values -- enough to test your color coding, but not the full list. Each value for KPI has a positive example, a negative example and a missing example, to see how the logic works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;*** code to test;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data final;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; length KPI $20 test1_for_lift test2_for_lift test3_for_lift $20; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; infile datalines dlm=',' dsd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; input rownum KPI $ Lift Lift2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; ** 2) first set of tests;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; **&amp;nbsp;&amp;nbsp;&amp;nbsp; as proc report is coded now;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; test1_for_lift = 'unknown1';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if lift &amp;lt; 0 then test1_for_lift = 'LT 0';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;gt; 1 then test1_for_lift = 'GT 1';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift = . then test1_for_lift = 'MISSING CODED 3';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; ** 2) second set of tests;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; test2_for_lift = 'unknown2';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if lift = . then test2_for_lift = 'TEST MISSING FIRST';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;lt; 0 then test2_for_lift = 'LT 0';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;gt; 1 then test2_for_lift = 'GT 1';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift = 0 then test2_for_lift = 'ZERO';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;gt; 0 and lift &amp;lt; 1 then test2_for_lift = 'POSITIVE FRACTION';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift = 1 then test2_for_lift = 'EXACTLY 1';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; ** 3) third set of tests;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; test3_for_lift = 'unknown3';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if lift = . then test3_for_lift = 'TEST MISSING FIRST';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift LE 0 then test3_for_lift = 'LE 0';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;gt; 0 then test3_for_lift = 'GT 0';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; label test1_for_lift = 'test1: Like PROC REPORT test missing last and gt 1'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test2_for_lift = 'test2: ALL Possible Values 5 conditions'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; test3_for_lift = 'test3: Simplified Test 3 conditions';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;return;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;1.1, "Response Rate", -.2038, -20.38&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;1.2, "Response Rate", .2038, 20.38&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;1.3, "Response Rate", .,.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;2.1, "Conversion Rate", -.7777, -77.77&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;2.2, "Conversion Rate", .7777, 77.77&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;2.3, "Conversion Rate", .,.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;3.1,"Cost Per Response", -.2972 ,-29.72&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;3.2,"Cost Per Response", .2972, 29.72&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;3.3, "Cost Per Response", ., .&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;4.1,"Test Zero", 0,0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;4.2,"Test GT 1", 1.234,123.4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;4.3,"Test LT 0", -1.234,-123.4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;4.4,"Test Pos Fraction", .1234,.1234&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;4.5,"Test Neg Fraction", -.1234,-12.34&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;4.6,"Test Exactly 1", 1, 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods listing close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html file='c:\temp\testlogic.html';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc print data=final label;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; title 'testing logic';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; var rownum kpi lift test:;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=Final nowd&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; style(header)={just=center font_size=10 pt font_face= 'Arial Narrow'&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FONT_WEIGHT =BOLD background=cxcccccc};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; title 'KPI Lift Report';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; column rownum KPI lift lift2; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define rownum / order;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define KPI / display&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; style(column)={ just=right&amp;nbsp; font_size=10pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD&amp;nbsp; cellwidth=1.4in};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define lift&amp;nbsp; / display &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; style(column)={just=center font_size=10pt font_face= 'Arial Narrow' cellwidth=.7in};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define lift2&amp;nbsp; / display &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; style(column)={just=center font_size=10pt font_face= 'Arial Narrow' cellwidth=.7in};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;** code has GT 1;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;compute lift;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' 'VideoQual RR') then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if lift = .&amp;nbsp; then call define(_col_,"style","style=[foreground=black]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;lt; 0 then call define(_col_,"style","style=[foreground=red]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;gt; 1 then call define(_col_,"style","style=[foreground=green]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;end;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;if KPI in('Cost Per Response' 'Cost Per Sale') then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if lift = . then call define(_col_,"style","style=[foreground=black]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;gt; 1 then call define(_col_,"style","style=[foreground=red]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift &amp;lt; 0 then call define(_col_,"style","style=[foreground=green]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;** Code has GT 0;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;compute lift2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;if KPI in('Response Rate' 'Conversion Rate' 'Yield Rate' 'VideoQual RR') then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if lift2 = .&amp;nbsp; then call define(_col_,"style","style=[foreground=black]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift2 &amp;lt; 0 then call define(_col_,"style","style=[foreground=red]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift2 &amp;gt; 0 then call define(_col_,"style","style=[foreground=green]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;end;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;if KPI in('Cost Per Response' 'Cost Per Sale') then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if lift2 = . then call define(_col_,"style","style=[foreground=black]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift2 &amp;gt; 0 then call define(_col_,"style","style=[foreground=red]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; else if lift2 &amp;lt; 0 then call define(_col_,"style","style=[foreground=green]");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11946iCFA15E53012AB4F0/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="diff_conditions_diff_colors.png" title="diff_conditions_diff_colors.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Mar 2014 16:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140154#M11160</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-03-16T16:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Traffic Lighting Based on the Value of Another Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140155#M11161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Cynthia that it took me so long to thank you for this. This is totally correct. Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 22:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Conditional-Traffic-Lighting-Based-on-the-Value-of-Another/m-p/140155#M11161</guid>
      <dc:creator>Mgarret</dc:creator>
      <dc:date>2014-05-05T22:29:24Z</dc:date>
    </item>
  </channel>
</rss>

