<?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 Color Cells With Missing Value and Greater Than Value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51780#M29363</link>
    <description>&lt;P&gt;Hello Forum!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to color cells in columns that start with "Diff" that has a value greater than .1 OR has a missing value (.) The&amp;nbsp;number of columns that start with "Diff" will grow as the data set grows. Here's what I have so far but probably won't work in the long run as the # or columns grow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Names Default to Here(1);&lt;/P&gt;&lt;P&gt;dt=current data table();&lt;/P&gt;&lt;P&gt;dt:Diff T00 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T00 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T01 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T01 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T02 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T02 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T03 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T03 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T04 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T04 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T05 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T05 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T06 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T06 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T07 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T07 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T08 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T08 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T09 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T09 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T10 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T10 &amp;gt;= .1));&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="set.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9446iAFAB52E75AB6965B/image-size/large?v=v2&amp;amp;px=999" role="button" title="set.PNG" alt="set.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 20:28:59 GMT</pubDate>
    <dc:creator>rmiyasato</dc:creator>
    <dc:date>2018-02-21T20:28:59Z</dc:date>
    <item>
      <title>Color Cells With Missing Value and Greater Than Value</title>
      <link>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51780#M29363</link>
      <description>&lt;P&gt;Hello Forum!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to color cells in columns that start with "Diff" that has a value greater than .1 OR has a missing value (.) The&amp;nbsp;number of columns that start with "Diff" will grow as the data set grows. Here's what I have so far but probably won't work in the long run as the # or columns grow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Names Default to Here(1);&lt;/P&gt;&lt;P&gt;dt=current data table();&lt;/P&gt;&lt;P&gt;dt:Diff T00 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T00 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T01 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T01 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T02 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T02 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T03 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T03 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T04 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T04 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T05 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T05 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T06 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T06 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T07 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T07 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T08 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T08 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T09 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T09 &amp;gt;= .1));&lt;BR /&gt;dt:Diff T10 &amp;lt;&amp;lt; color cells("Red", dt&amp;lt;&amp;lt;get rows where(dt:Diff T10 &amp;gt;= .1));&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="set.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9446iAFAB52E75AB6965B/image-size/large?v=v2&amp;amp;px=999" role="button" title="set.PNG" alt="set.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 20:28:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51780#M29363</guid>
      <dc:creator>rmiyasato</dc:creator>
      <dc:date>2018-02-21T20:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Color Cells With Missing Value and Greater Than Value</title>
      <link>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51784#M29366</link>
      <description>&lt;P&gt;I think something like this will work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Current Data Table();

colNames = dt &amp;lt;&amp;lt; get column names( numeric, string );

For( i = 1, i &amp;lt;= N Items( colNames ), i++,
	If( Left( colNames[i], 4 ) != "Diff",
		Column( dt, colNames ) &amp;lt;&amp;lt; color cells( "Red", dt &amp;lt;&amp;lt; get rows where( As Column( dt, colNames ) &amp;gt;= .1 ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:05:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51784#M29366</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-02-21T21:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Color Cells With Missing Value and Greater Than Value</title>
      <link>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51798#M29378</link>
      <description>&lt;P&gt;Hmmm... that's odd. The wong column gets highlighted. I've attached the script and csv. I do get an error saying that the column "Data" needs to be a character type. But I need it to be numeric for the calc.&lt;/P&gt;&lt;P&gt;Values in columns starting with Diff*** &amp;gt; .1 ==Red&lt;/P&gt;&lt;P&gt;Values in columns starting with Diff*** = missing values ==Red&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="Capture.PNG" style="width: 921px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9447i77EB536049E52108/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:09:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51798#M29378</guid>
      <dc:creator>rmiyasato</dc:creator>
      <dc:date>2018-02-21T22:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Color Cells With Missing Value and Greater Than Value</title>
      <link>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51810#M29387</link>
      <description>&lt;P&gt;There were 2 errors.....&lt;/P&gt;
&lt;P&gt;1. I reversed the logic of the If() function I had specified....I had "!=" and it needs to be "==".&lt;/P&gt;
&lt;P&gt;2. The colNames references in the color cells() had to reference the specific column....my error too&lt;/P&gt;
&lt;P&gt;I have also cleaned up your code a bit......nothing major,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = Open(
	Pick File(),
	columns(
		Column( "IM#", Character, "Nominal" ),
		Column( "LREQ", Numeric, "Continuous", Format( "Best", 10 ) ),
		Column( "DATE/TIME", Character, "Nominal" ),
		Column( "T(x)", Character, "Nominal" ),
		Column( "BOARD", Numeric, "Continuous", Format( "Best", 10 ) ),
		Column( "CHANNEL", Numeric, "Continuous", Format( "Best", 10 ) ),
		Column( "DATA", Numeric, "Continuous", Format( "Best", 10 ) )
	),
	Import Settings(
		End Of Line( CRLF ),
		End Of Field( Tab, Comma, CSV( 0 ) ),
		Strip Quotes( 1 ),
		Use Apostrophe as Quotation Mark( 0 ),
		Scan Whole File( 1 ),
		Treat empty columns as numeric( 0 ),
		CompressNumericColumns( 0 ),
		CompressCharacterColumns( 0 ),
		CompressAllowListCheck( 0 ),
		Labels( 1 ),
		Column Names Start( 1 ),
		Data Starts( 2 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )
	)
) &amp;lt;&amp;lt; Set Name( "DT1" );


Data Table( "DT1" ) &amp;lt;&amp;lt; Sort(
	By( :BOARD, :CHANNEL, :Name( "T(x)" ) ),
	Order( Ascending, Ascending, Ascending ),
	replace table
) &amp;lt;&amp;lt; New Column( "T00 Value",
	formula( If( :Name( "T(x)" ) == "T00", :Data, :T00 Value[Row() - 1] ) )
) &amp;lt;&amp;lt; New Column( "Diff",
	formula( (:Data - :T00 Value) / :T00 Value ),
	Format( "Percent" )
);

dt = Data Table( "DT1" ) &amp;lt;&amp;lt; Split(
	Split By( :Name( "T(x)" ) ),
	Split( :DATA, :Name( "Diff" ) ),
	Group( :IM#, :LREQ, :BOARD, :CHANNEL ),
	Remaining Columns( Drop All ),
	Output Table Name( "DT2" )
);

Close( Data Table( "DT1" ), No Save );

//Names Default To Here( 1 );

//dt = Current Data Table();

colNames = dt &amp;lt;&amp;lt; get column names( numeric, string );

For( i = 1, i &amp;lt;= N Items( colNames ), i++,
	If( Left( colNames[i], 4 ) == "Diff",
		Column( dt, colNames[i] ) &amp;lt;&amp;lt; color cells(
			"Red",
			dt &amp;lt;&amp;lt; get rows where( As Column( dt, colNames[i] ) &amp;gt;= .1 )
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Feb 2018 03:50:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-Cells-With-Missing-Value-and-Greater-Than-Value/m-p/51810#M29387</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-02-22T03:50:20Z</dc:date>
    </item>
  </channel>
</rss>

