How to set conditional colors in a Platform Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I have a ServiceNow Platform Analytics Semi Donut visualization configured as:
- Table: Task SLA
- Metric: COUNT DISTINCT Task
- Group by: Has breached
The chart correctly shows both true and false, but the colors are automatically assigned.
I need:
true (breached) = Red
false (not breached) = Green
Under Presentation > Colors, I only have options for Default, Color palette, and Fixed element color. How can I assign a specific color to each group-by value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
| Step | Action | Detail |
| 1 | Navigate to Chart Colors | In the Application Navigator, search for and go to Platform Analytics Administration > Color Settings > Chart Colors (or type sys_report_chart_color.list in the filter navigator) . |
| 2 | Create mapping for true | Click New and configure a record : |
| • Name (Table): task_sla | ||
| • Element (Field): has_breached | ||
| • Value: true | ||
| • Color: Select/define your Red color. | ||
| 3 | Create mapping for false | Click New again and configure : |
| • Name (Table): task_sla | ||
| • Element (Field): has_breached | ||
| • Value: false | ||
| • Color: Select/define your Green color. | ||
| 4 | Configure the Visualization | Open your Semi Donut visualization configuration: |
| • Go to Presentation > Colors. | ||
| • Set Color type to Fixed element color |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @vaibhavishi
You can do this with Fixed element colour. Steps:
- Go to All > Platform Analytics > Dashboards and open your dashboard.
- Click Edit (top right).
- Click your Semi Donut visualisation so the configuration panel opens on the right.
- Go to Presentation > Colours.
- Select Fixed element colour.
- The group-by values are listed separately. Set:
true (breached) = Red
false (not breached) = Green - Click Apply, then Save the dashboard.
If true/false aren't listed in step 6, check that Group by = Has breached is applied and the chart has loaded data, then reopen Colours.
If this helps, please mark it as Helpful or Accept as Solution.