Choose Language Hide Translation Bar
Highlighted

Conditional formatting in a data table

Hi. Does anyone know how to do conditional formatting in a data table column? For example, I want to have the cells in a specific column to turn red when the value is greater than or equal to 0.20. I have found instructions on how to do this in a report but not a data table.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
julian
Community Manager Community Manager

Re: Conditional formatting in a data table

Hi @Michelle_Martin,

 

Have you tried the Color Gradient column property? Right-click the column you want to format > Column Info. Then, add the Color Gradient column property, check the box to "Color Cell by Value," and click the gradient to set the color theme (or define your own). To have a sharp cut-off, set the Minimum and Center to the same value, and the Max to one unit higher. 

Screen Shot 2018-02-01 at 8.58.16 PM.png

 

Screen Shot 2018-02-01 at 8.58.32 PM.png

 

 

 

I hope this helps!

 

@julian

View solution in original post

3 REPLIES 3
Highlighted
cwillden
Super User

Re: Conditional formatting in a data table

Here's an example with Big Class where I color cells red if the age is > 14:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Where(:Age > 14);
:Age << Color Cells( "Red" );
dt << Clear Select;
-- Cameron Willden
Highlighted
Heidi
Level II

Re: Conditional formatting in a data table

Hi,

I kind of use your code, then I found if there's no cell fit the selection, the whole column will be red. 

Highlighted
julian
Community Manager Community Manager

Re: Conditional formatting in a data table

Hi @Michelle_Martin,

 

Have you tried the Color Gradient column property? Right-click the column you want to format > Column Info. Then, add the Color Gradient column property, check the box to "Color Cell by Value," and click the gradient to set the color theme (or define your own). To have a sharp cut-off, set the Minimum and Center to the same value, and the Max to one unit higher. 

Screen Shot 2018-02-01 at 8.58.16 PM.png

 

Screen Shot 2018-02-01 at 8.58.32 PM.png

 

 

 

I hope this helps!

 

@julian

View solution in original post

Article Labels

    There are no labels assigned to this post.