<?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 formatting in a data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59109#M32512</link>
    <description>&lt;P&gt;It does seem to work, but in my case I have 3 columns of very similar e.i. weeight data. I want to highlight one out of three columns that contains value &amp;gt;20% from the mean&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 02 Jun 2018 18:08:36 GMT</pubDate>
    <dc:creator>robertasme</dc:creator>
    <dc:date>2018-06-02T18:08:36Z</dc:date>
    <item>
      <title>Conditional formatting in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59099#M32508</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to apply conditional formula for columns in order to apply cell color but I can't achieve successful result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any suggestions how to do it?&amp;nbsp;I believe I am using wrong formula here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Columns&lt;/P&gt;&lt;P&gt;UV&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UV to reject&lt;/P&gt;&lt;P&gt;0.15&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;0.15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Formula: If( :UV == :UV to reject,&lt;BR /&gt;&amp;nbsp;Color Of( "Red" ),&lt;BR /&gt;&amp;nbsp;"White"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Idea is that JMP highlights the cell in color red if the value is equal to a value in another column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2018 11:25:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59099#M32508</guid>
      <dc:creator>robertasme</dc:creator>
      <dc:date>2018-06-02T11:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59107#M32510</link>
      <description>&lt;P&gt;The formula processor complained when I attempted to set the cell color from a column formula, however, below is a simple script that works.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; New Column( "Reject", character );

For Each Row(
	If( :weight &amp;gt; 120,
		:reject &amp;lt;&amp;lt; color cells( "red", Row() ),
		:reject &amp;lt;&amp;lt; color cells( "white", Row() )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="color.PNG" style="width: 345px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10952i90A5C083436E5BA9/image-dimensions/345x278?v=v2" width="345" height="278" role="button" title="color.PNG" alt="color.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2018 14:56:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59107#M32510</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-02T14:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59109#M32512</link>
      <description>&lt;P&gt;It does seem to work, but in my case I have 3 columns of very similar e.i. weeight data. I want to highlight one out of three columns that contains value &amp;gt;20% from the mean&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2018 18:08:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59109#M32512</guid>
      <dc:creator>robertasme</dc:creator>
      <dc:date>2018-06-02T18:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59110#M32513</link>
      <description>&lt;P&gt;1. What version of JMP are you running?&lt;/P&gt;
&lt;P&gt;2. What do you mean that it doesn't seem to work?&amp;nbsp; It runs without error in JMP 12, 13 and 14.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2018 19:57:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59110#M32513</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-02T19:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59124#M32519</link>
      <description>&lt;P&gt;I'm running JMP 14&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code you is working don't get me wrong. The thing is that I am looking for a solution that would allow me to distinguish which column out of 3 data columns is the furthest from the mean ( visually)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am really sorry if I am being ambigues.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 20:00:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59124#M32519</guid>
      <dc:creator>robertasme</dc:creator>
      <dc:date>2018-06-03T20:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in a data table</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59127#M32521</link>
      <description>&lt;P&gt;I am still confused as to what "Mean" you are referring to?&amp;nbsp; But, the code below takes a guess at one of the possible means to compare with, and from it sets the cell with the max difference from the mean.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
// Open the sample data table
dt = Open( "$SAMPLE_DATA/blood pressure.jmp" );

// Loop across rows to find what cells have the max values
For Each Row(
	// Find the mean for the target columns in the row
	rowMean = Mean( :BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F );
	// Initialize the memory variables to hold the max value and the column the max value is in
	MaxVal = 0;
	Col = 0;
	// Loop across the columns in question and find the max value
	For( i = 1, i &amp;lt;= 9, i++,
		If( Abs( Column( i + 2 )[Row()] - rowMean ) &amp;gt; MaxVal,
			MaxVal = Abs( Column( i + 2 )[Row()] - rowMean );
			Col = i + 2;
		)
	);
	// Set the cell color for the cell that has the max value
	Column( col ) &amp;lt;&amp;lt; color cells( "red", Row() );
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cell colors.PNG" style="width: 847px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10953i8345DDFAAFAAC64E/image-size/large?v=v2&amp;amp;px=999" role="button" title="cell colors.PNG" alt="cell colors.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 21:38:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-in-a-data-table/m-p/59127#M32521</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-03T21:38:41Z</dc:date>
    </item>
  </channel>
</rss>

