Conditional formatting in a data tableHi. 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.
Re: Conditional formatting in a data tableIt is easily done using Standardize Attributes. Select all of the columns you want to have the color gradient set for, and then go to the red triangle in the Columns Panel at the left of the data table, and select Standardize Attributes. You can then set the Color Gradient column property, and all columns selected will be set the same.Re: Conditional formatting in a data tableIs there anyway to automatically do this for all the columns in the data table? Through scripting or the column info tab
Solved: Standardize Attributes. Didn't see a delete button for replies so I can't delete this ...
Re: Conditional formatting in a data tableHi,
I kind of use your code, then I found if there's no cell fit the selection, the whole column will be red.
Re: Conditional formatting in a data tableHi @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.


I hope this helps!
@julian
Re: Conditional formatting in a data tableHere'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;