Skip to main content
This example shows a KPI chart with dynamic color styling using the Markdown visualization. Three KPI charts with conditional colors

Setup

This pattern uses a SQL CASE statement to assign a label based on the value of a metric. That label is then referenced in the Markdown as a CSS class to control styling. For example:
Which would look like this in the workbook query: Conditional values in workbook query results

Example code