Formatting tables and crosstabs using conditional statements
You can format tables and crosstabs based on conditional (IF
)
statements. The IF
condition is based on the value of the column
data.
To format tables and crosstabs based on conditions:
- Click in a column of a table.
- Click Table Formatting (paintbrush icon).
- In the Table Formatting panel, click IF Conditional.
-
The Conditional Formatting menu opens.
Visualizer lists the columns you can format.
After you define the formatting, you can toggle formatting on or off using the desired toggle switch.
- To define the formatting, click one of the conditions. Visualizer shows the basic formatting options for the type of data in the column.
-
In basic formatting,
you can format the data using one, two, or three intervals. The default
is one.
Note: If basic formatting options do not apply to the data, Visualizer shows the advanced formatting options, where you can enter an expression.
-
If desired, add an icon and change the color of the data in the cell. For example,
Quantity over a specified amount shows an Up arrow and is rendered in green.
Use the slider to set the conditional threshold.
You can also format the values below the threshold. For example, specify a color and icon for lower values.
This technique formats every cell.
-
To add additional formatting or leave some cells plain, click the Interval icon for two or three intervals. For
example, to add formatting to only the top and bottom ranges, select 2 intervals and
format them.
-
Optionally, use Advanced formatting and enter an expression or multiple
expressions. Assign each expression a color and/or an indicator icon, and click
Apply.
Note: For help with expressions, see Supported Functions and Operators in Visualizer Expressions.
- Click Done when you are finished defining conditional formatting.