Create the cellvalue definitions. The DEFINE CELLVALUE statements define the values that appear in the cells of the crosstabulation table.
The HEADER= attribute specifies the text that appears in the legend. The LABEL= attribute specifies the label for the data set column that corresponds to the cellvalue. The LABEL= attribute affects only the Output destination.
The DATA_FORMAT_OVERRIDE=ON attribute specifies to use the format specified in the data component. The PRINT=ON attribute causes the cellvalue to appear in the table.
The CELLSTYLE AS statement uses expressions to conditionally set the style element of the cells according to the values of the variables for the Percent cellvalue. The _VAL_ variable represents the value of a cell. Therefore, in this example, if the value in a cell is less than ten, then the font color for the DataStrong style element is green. If the value in the cell is greater than twenty, the font color is #BF6930.
define cellvalue Frequency; header="Frequency"; format=BEST7.; label="Frequency Count"; data_format_override=on print=on; end; define cellvalue Expected; header="Expected"; format=BEST6.; label="Expected Frequency"; data_format_override=on print=on; end; define cellvalue Deviation; header="Deviation"; format=BEST6.; label="Deviation from Expected Frequency"; data_format_override=on print=on; end; define cellvalue CellChiSquare; header="Cell Chi-Square"; format=BEST6.; label="Cell Chi-Square"; print=on; end; define cellvalue TotalPercent; header="Total Percent"; format=6.2; label="Percent of Total Frequency"; print=on; end; define cellvalue Percent; header="Percent"; format=6.2; label="Percent of Two-Way Table Frequency"; print=on; cellstyle _val_ > 20.0 as {color=#BF6930}; end; define cellvalue RowPercent; header="Row Percent"; format=6.2; label="Percent of Row Frequency"; print=on; end; define cellvalue ColPercent; header="Column Percent"; format=6.2; label="Percent of Column Frequency"; print=on; end; define cellvalue CumColPercent; header="Cumulative Column Percent"; format=6.2; label="Cumulative Percent of Column Frequency"; print=on; end;