Easy Insight Logo
Call 1-(720)-316-8174

Conditional Formatting

Basic Conditional Formatting

Let's say you want to highlight values where the Current Stage is 'Closed - Won' as green. In the report editor, click on the "Configuration" menu in the report editor and choose "Conditional Formatting." Within the conditional formatting page, you would add the following expression:

if([Current Stage] == 'Closed - Won', colortext([Current Stage], "#008800"))

When this formatting runs, the resulting report will color the bar as green as shown below:

Conditional Formatting Chart

The colortext() function takes in the parameters of the field you wish to highlight and an HTML color code surrounded by double quotes. Similar functions are available for adjusting the background color:

if([Current Stage] == 'Closed - Won', backgroundcolor([Deal Size], "#008800"))
Conditional Formatting Chart

In the above example, the black text on dark green background color makes for poor visual contrast. To fix this, you can add autotextfrombackground() to your conditional formatting expressoin:


if([Current Stage] == 'Closed - Won', backgroundcolor([Deal Size], "#008800"))
autotextfrombackground()
                    

The autotextfrombackground() function automatically changes the text color based on the background color to provide better contrast:

Conditional Formatting Chart

You can also change to text be displayed as bold based on a certain condition:

if([Current Stage] == 'Closed - Won', bold([Deal Size]))
Conditional Formatting Chart

You can highlight the entire row with a certain background color:

if([Current Stage] == 'Closed - Won', backgroundcolorrow("#FFCCCC"))
Conditional Formatting Chart

And you can display an alternate text value for the cell with list, tree or crosstab reports:

if([Deal Size] == 0, altdisplay([Deal Size], "N/A"))
Conditional Formatting Chart
RESOURCES
Twitter Logo