<?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 Conditional Format top 5 by colouring cell and text in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345595#M22871</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wanting to know how to conditional format the top 5 results (from 28) for each day of the week in a proc Report. The final output is into PDF.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc Report Data=work.Max_Abandon_New2_Trans style(report)=[BORDERCOLOR=BLACK BACKGROUND=#FFFFFF]
	STYLE(HEADER)={BACKGROUND=#008080 COLOR=WHITE FONTWEIGHT=BOLD BORDERCOLOR=BLACK}
	style(Column)={BORDERCOLOR=BLACK background=White COLOR=Black};
	Columns MBL Cluster day_2 day_3 day_4 day_5 day_6 day_7 day_1;
	Define MBL / DISPLAY 'Business Line' Order;
	Define Cluster / DISPLAY 'Cluster';
	Define day_2 / DISPLAY 'Monday' format=TIME8. ;
	Define day_3 / DISPLAY 'Tuesday' format=TIME8. ;
	Define day_4 / DISPLAY 'Wednesday' format=TIME8. ;
	Define day_5 / DISPLAY 'Thursday' format=TIME8. ;
	Define day_6 / DISPLAY 'Friday' format=TIME8. ;
	Define day_7 / DISPLAY 'Saturday' format=TIME8. ;
	Define day_1 / DISPLAY 'Sunday' format=TIME8. ;

	title3 color=Black font=Arial BOLD "Maximum Abandon Time (Week Ending &amp;amp;Excel_Date_Prompt)";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is what I'm looking for in the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="PDF_Output.PNG" alt="PDF_Output.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/8028i394822BE4C027D0E/image-size/small?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added the following code that allows me to format anything over 1 Hour&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;	compute day_2;

		if day_2 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I make it do the 'top 5' though?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By using the following code I get the conditional formatting for the week however if&amp;nbsp;it is&amp;nbsp;a part Week ( Monday - Wednesday) way through the week it returns&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;ERROR: Variable day_5 is not on file WORK.MAX_ANSWER_NEW2_TRANS.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#000000"&gt;&lt;CODE class=" language-sas"&gt;compute day_2;
		if day_2 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_3;
		if day_3 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_4;
		if day_4 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_5;
		if day_5 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_6;
		if day_6 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color=""&gt;How can I get it to pass on the data (Days) that have not been populated yet?&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 01:34:06 GMT</pubDate>
    <dc:creator>DME790</dc:creator>
    <dc:date>2017-03-30T01:34:06Z</dc:date>
    <item>
      <title>Conditional Format top 5 by colouring cell and text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345595#M22871</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wanting to know how to conditional format the top 5 results (from 28) for each day of the week in a proc Report. The final output is into PDF.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc Report Data=work.Max_Abandon_New2_Trans style(report)=[BORDERCOLOR=BLACK BACKGROUND=#FFFFFF]
	STYLE(HEADER)={BACKGROUND=#008080 COLOR=WHITE FONTWEIGHT=BOLD BORDERCOLOR=BLACK}
	style(Column)={BORDERCOLOR=BLACK background=White COLOR=Black};
	Columns MBL Cluster day_2 day_3 day_4 day_5 day_6 day_7 day_1;
	Define MBL / DISPLAY 'Business Line' Order;
	Define Cluster / DISPLAY 'Cluster';
	Define day_2 / DISPLAY 'Monday' format=TIME8. ;
	Define day_3 / DISPLAY 'Tuesday' format=TIME8. ;
	Define day_4 / DISPLAY 'Wednesday' format=TIME8. ;
	Define day_5 / DISPLAY 'Thursday' format=TIME8. ;
	Define day_6 / DISPLAY 'Friday' format=TIME8. ;
	Define day_7 / DISPLAY 'Saturday' format=TIME8. ;
	Define day_1 / DISPLAY 'Sunday' format=TIME8. ;

	title3 color=Black font=Arial BOLD "Maximum Abandon Time (Week Ending &amp;amp;Excel_Date_Prompt)";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is what I'm looking for in the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="PDF_Output.PNG" alt="PDF_Output.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/8028i394822BE4C027D0E/image-size/small?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added the following code that allows me to format anything over 1 Hour&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;	compute day_2;

		if day_2 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I make it do the 'top 5' though?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By using the following code I get the conditional formatting for the week however if&amp;nbsp;it is&amp;nbsp;a part Week ( Monday - Wednesday) way through the week it returns&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;ERROR: Variable day_5 is not on file WORK.MAX_ANSWER_NEW2_TRANS.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#000000"&gt;&lt;CODE class=" language-sas"&gt;compute day_2;
		if day_2 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_3;
		if day_3 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_4;
		if day_4 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_5;
		if day_5 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_6;
		if day_6 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color=""&gt;How can I get it to pass on the data (Days) that have not been populated yet?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 01:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345595#M22871</guid>
      <dc:creator>DME790</dc:creator>
      <dc:date>2017-03-30T01:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format top 5 by colouring cell and text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345659#M22875</link>
      <description>&lt;PRE&gt;
Each variable should have a compute block.
or for the convenient , make a traffic light format .

compute day_2;

		if day_2 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;


compute day_3;

		if day_3 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;


compute day_4;

		if day_4&amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Mar 2017 07:03:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345659#M22875</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-30T07:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format top 5 by colouring cell and text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345680#M22876</link>
      <description>&lt;P&gt;Tghanks K-Sharp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have Compute code for each day.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compute day_2;

		if day_2 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_3;

		if day_3 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_4;

		if day_4 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_5;

		if day_5 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;

	compute day_6;

		if day_6 &amp;gt; 3600 then
			call define(_col_, 'style', 'style=[background= #E599A7 COLOR=#CC1B2B ]');
	EndComp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However as there is no data past say day_5 it comes up with an error. The error is what I'm trying to get around as this is a weekly report that is updated on a daily basis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 08:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345680#M22876</guid>
      <dc:creator>DME790</dc:creator>
      <dc:date>2017-03-30T08:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format top 5 by colouring cell and text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345685#M22877</link>
      <description>&lt;P&gt;HoHo, you need make a macro variable from dictioanary table 'dictionary.columns' to hold those existed variables.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 08:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345685#M22877</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-30T08:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format top 5 by colouring cell and text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345973#M22898</link>
      <description>&lt;P&gt;Thanks Ksharp - using a macro variable from dictioanary table 'dictionary.columns'&amp;nbsp; is a little outside my experience.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help though&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 21:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Conditional-Format-top-5-by-colouring-cell-and-text/m-p/345973#M22898</guid>
      <dc:creator>DME790</dc:creator>
      <dc:date>2017-03-30T21:31:37Z</dc:date>
    </item>
  </channel>
</rss>

