<?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 Traffic Lighting with Proc Tabulate in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/422946#M27267</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, Every body.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The desired result or report is mentioned below. Task in this report is that if score is between &lt;STRONG&gt;ORMC – BRMC&lt;/STRONG&gt; threshold then score&amp;nbsp;will be highlighted with &lt;STRONG&gt;green&lt;/STRONG&gt; color and if score is between &lt;STRONG&gt;MRC and BRMC&lt;/STRONG&gt; threshold then score will be highlighted with &lt;STRONG&gt;blue&lt;/STRONG&gt; color and if score is greater than MRC then score color will be highlighted with &lt;STRONG&gt;Red&lt;/STRONG&gt; color. I also mentioned below the code which I used to construct below report&amp;nbsp;without incorporating the traffic lighting and also attached the table used in it.&amp;nbsp;&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="KRI Report.JPG" style="width: 784px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17459i7DA561368BA094A8/image-dimensions/784x200?v=v2" width="784" height="200" role="button" title="KRI Report.JPG" alt="KRI Report.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TITLE;&lt;BR /&gt;TITLE1 "KRI Report for the Period Jan - Oct 2017";&lt;BR /&gt;FOOTNOTE;&lt;BR /&gt;FOOTNOTE1 "Generated by the SAS System (&amp;amp;_SASSERVERNAME, &amp;amp;SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";&lt;BR /&gt;/* -------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Code generated by SAS Task&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Generated on: Friday, December 15, 2017 at 4:56:37 PM&lt;BR /&gt;&amp;nbsp;&amp;nbsp; By task: ORMC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Input Data: WORK.FILTER_FOR_QUERY_FOR_KRI_OBS_DET&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Server:&amp;nbsp; SASApp&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------- */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* -------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Run the tabulate procedure&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------- */&lt;BR /&gt;PROC TABULATE&lt;BR /&gt;DATA=WORK.FILTER_FOR_QUERY_FOR_KRI_OBS_DET(FIRSTOBS=1 )&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;FORMAT=COMMA20.&lt;BR /&gt;&amp;nbsp;;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;VAR SCORE1;&lt;BR /&gt;&amp;nbsp;CLASS "Key Risk Indicator (KRI)"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Reporting Frequency"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Responsible Unit"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Threshold for ORMC"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS DUE_DT /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Threshold for MRC"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Threshold for BRMC"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;TABLE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/* ROW Statement */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;"Responsible Unit"n *"Key Risk Indicator (KRI)"n *"Reporting Frequency"n *"Threshold for ORMC"n *"Threshold for BRMC"n *"Threshold for MRC"n&amp;nbsp; ,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/* COLUMN Statement */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;DUE_DT=' '&amp;nbsp; *(SCORE1=' ' * Max=' ' ) &amp;nbsp;&amp;nbsp;;&lt;BR /&gt;&amp;nbsp;;&lt;/P&gt;&lt;P&gt;RUN;&lt;BR /&gt;/* -------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&amp;nbsp; End of task code.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------- */&lt;BR /&gt;RUN; QUIT;&lt;BR /&gt;TITLE; FOOTNOTE;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KRI Report.JPG" style="width: 0px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17457iEA25967CE26AC0CB/image-size/small?v=v2&amp;amp;px=200" width="0" height="0" role="button" title="KRI Report.JPG" alt="KRI Report.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Rehman Panjwani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2017 04:33:48 GMT</pubDate>
    <dc:creator>rehmanpanjwani</dc:creator>
    <dc:date>2017-12-21T04:33:48Z</dc:date>
    <item>
      <title>Traffic Lighting with Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/422946#M27267</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, Every body.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The desired result or report is mentioned below. Task in this report is that if score is between &lt;STRONG&gt;ORMC – BRMC&lt;/STRONG&gt; threshold then score&amp;nbsp;will be highlighted with &lt;STRONG&gt;green&lt;/STRONG&gt; color and if score is between &lt;STRONG&gt;MRC and BRMC&lt;/STRONG&gt; threshold then score will be highlighted with &lt;STRONG&gt;blue&lt;/STRONG&gt; color and if score is greater than MRC then score color will be highlighted with &lt;STRONG&gt;Red&lt;/STRONG&gt; color. I also mentioned below the code which I used to construct below report&amp;nbsp;without incorporating the traffic lighting and also attached the table used in it.&amp;nbsp;&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="KRI Report.JPG" style="width: 784px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17459i7DA561368BA094A8/image-dimensions/784x200?v=v2" width="784" height="200" role="button" title="KRI Report.JPG" alt="KRI Report.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TITLE;&lt;BR /&gt;TITLE1 "KRI Report for the Period Jan - Oct 2017";&lt;BR /&gt;FOOTNOTE;&lt;BR /&gt;FOOTNOTE1 "Generated by the SAS System (&amp;amp;_SASSERVERNAME, &amp;amp;SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";&lt;BR /&gt;/* -------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Code generated by SAS Task&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Generated on: Friday, December 15, 2017 at 4:56:37 PM&lt;BR /&gt;&amp;nbsp;&amp;nbsp; By task: ORMC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Input Data: WORK.FILTER_FOR_QUERY_FOR_KRI_OBS_DET&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Server:&amp;nbsp; SASApp&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------- */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* -------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Run the tabulate procedure&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------- */&lt;BR /&gt;PROC TABULATE&lt;BR /&gt;DATA=WORK.FILTER_FOR_QUERY_FOR_KRI_OBS_DET(FIRSTOBS=1 )&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;FORMAT=COMMA20.&lt;BR /&gt;&amp;nbsp;;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;VAR SCORE1;&lt;BR /&gt;&amp;nbsp;CLASS "Key Risk Indicator (KRI)"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Reporting Frequency"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Responsible Unit"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Threshold for ORMC"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS DUE_DT /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Threshold for MRC"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;CLASS "Threshold for BRMC"n /&amp;nbsp;ORDER=UNFORMATTED MISSING;&lt;BR /&gt;&amp;nbsp;TABLE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/* ROW Statement */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;"Responsible Unit"n *"Key Risk Indicator (KRI)"n *"Reporting Frequency"n *"Threshold for ORMC"n *"Threshold for BRMC"n *"Threshold for MRC"n&amp;nbsp; ,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/* COLUMN Statement */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;DUE_DT=' '&amp;nbsp; *(SCORE1=' ' * Max=' ' ) &amp;nbsp;&amp;nbsp;;&lt;BR /&gt;&amp;nbsp;;&lt;/P&gt;&lt;P&gt;RUN;&lt;BR /&gt;/* -------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&amp;nbsp; End of task code.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ------------------------------------------------------------------- */&lt;BR /&gt;RUN; QUIT;&lt;BR /&gt;TITLE; FOOTNOTE;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KRI Report.JPG" style="width: 0px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17457iEA25967CE26AC0CB/image-size/small?v=v2&amp;amp;px=200" width="0" height="0" role="button" title="KRI Report.JPG" alt="KRI Report.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Rehman Panjwani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 04:33:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/422946#M27267</guid>
      <dc:creator>rehmanpanjwani</dc:creator>
      <dc:date>2017-12-21T04:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Traffic Lighting with Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423023#M27269</link>
      <description>&lt;P&gt;with Proc TABULATE you can not trafficligth for a column, based on values from another column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do this with Proc REPORT, see sample below. Note, that when using ACROSS in Proc REPORT, you have to use&amp;nbsp;special column names to address the appropriate column. The example uses an array to&amp;nbsp;access&amp;nbsp;the across values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.cars;
  columns type horsepower=hpall_avg origin,  horsePower=hpavg origin, invoice=invsum _dummy;
  define type / group;
  define origin / across;
  define hpall_avg / analysis mean f=commax12.;
  define hpavg / analysis mean f=commax12.;
  define invsum  / analysis n f=commax12.;
  define _dummy / computed;

  compute _dummy / char length=32;
    array nhpavg{*} _c3 _c4_ _c5_;
    do i = 1 to dim(nhpavg);
      if nhpavg{i} &amp;gt; (hpall_avg * 1) then do;
        call define(vname(nhpavg{i}), "style", "style={background=cx4dbf81}");
      end;
    end;
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 10:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423023#M27269</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-12-21T10:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Traffic Lighting with Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423037#M27270</link>
      <description>&lt;P&gt;Dear Bruno,&lt;/P&gt;&lt;P&gt;Thank you for response. Will appreciate to implement this logic in my data. as I could not understand the given coding by you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Rehman Panjwani&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 10:26:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423037#M27270</guid>
      <dc:creator>rehmanpanjwani</dc:creator>
      <dc:date>2017-12-21T10:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Traffic Lighting with Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423039#M27271</link>
      <description>&lt;P&gt;the code sample compares the average horsepower by type with the average horsepower for the crossing of type and origin and colors the cell green.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 10:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423039#M27271</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-12-21T10:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Traffic Lighting with Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423147#M27274</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/96782"&gt;@rehmanpanjwani&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Dear Bruno,&lt;/P&gt;
&lt;P&gt;Thank you for response. Will appreciate to implement this logic in my data. as I could not understand the given coding by you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards,&lt;/P&gt;
&lt;P&gt;Rehman Panjwani&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The code uses SASHELP data set so you can run it in your system. Once it runs, start changing things and see how it behaves. Once you understand that, you can move to implementing it on your data set.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 16:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Traffic-Lighting-with-Proc-Tabulate/m-p/423147#M27274</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-21T16:26:50Z</dc:date>
    </item>
  </channel>
</rss>

