KPI (Single Value) chart options

KPI (Single Value) charts highlight key performance metrics — such as total revenue, active users, or conversion rates — to provide immediate, at-a-glance insight into business performance. By combining a prominent primary metric with contextual elements like sparklines, progress bars, and value comparisons, KPI charts help you quickly identify trends, evaluate progress toward goals, and build scannable dashboards and Explores. This page provides an overview for using and customizing KPI (Single Value) charts in Looker.

A KPI visualization with a progress bar and a sparkline that compares the first time purchase count with the overall order count.

Things to know

When several single value visualizations appear on a dashboard, each visualization defaults to using the same font size for a consistent appearance. However, single value visualizations automatically resize fonts when a tile size is reduced. If the font for a visualization cannot show the entire value in the space available, then the value is truncated by an ellipsis (...).

If the Smart Single Value Text Size feature is enabled, the displayed fonts on single value visualizations in dashboard tiles automatically resize to display at least 8-10 value characters within the tile at any given size.

KPI (Single Value) chart options

To use a KPI (Single Value) visualization, select the KPI (Single Value) option in the Explore Select chart or Change chart menu. Next, select the Style tab in the Configure panel to edit your chart.

You can make selections in the Style, Comparison, and Formatting menus to customize the appearance of the KPI (Single Value) visualization.

Style menu options

The Style menu includes the following options.

Colors Collection

Choose a color collection from the Colors Collection menu. A collection lets you create themed visualizations and dashboards that look good together. You can see all the palettes in each of Looker's built-in color collections on the Color collections documentation page. Your Looker admin may also create a custom color collection for your organization.

Primary Value

The settings in this section let you choose the primary value for the KPI (Single Value) visualization, including the following:

  • Primary Series: Choose a measure from the Explore to set as a primary series. The value of the measure will be the value that is compared against when the Show Comparison setting in the Comparison menu is turned on.
  • Primary Row: Specify a row's value from the Primary Series to display. Options include 1st, 2nd, Last, and Total (when Totals are enabled). 1st is selected by default.
  • Alignment: Choose an alignment option for the values in the visualization. Options include Left, Center, and Right. This setting applies to all of the values in the visualization.

Value Color

To set the color of the chart value, click the color swatch in the Value Color section to open the color picker menu.

  • To pick a color from a palette, click the Palettes tab of the color picker menu, and then use the left and right arrows to scroll through the available palettes. Select a color by clicking on a color in one of the palettes.
  • To select a custom color, click the Custom tab of the palette picker, and then either use the color gradient and value slider to choose a custom color, or enter an RGB hex string, such as #2ca6cd, or CSS color name, such as mediumblue, into the input field.

Looker will use the selected color for single value visualizations both with and without hyperlinks.

Depending on your needs, consider using the following alternate techniques:

  • Change the font color to differentiate between good or bad results: Turn on the Show Comparison setting in the Comparison menu, and choose the Show as Change option.
  • Change the font color for a particular field's value everywhere, including in the Explore Data pane: A LookML developer can add an html parameter to the field definition.

Value Format

You can specify the format of the value, independent of the underlying dimension or measure. The field accepts Excel-style formatting. If no formatting is specified, the value displays in the format of the underlying dimension or measure.

MS Excel's complete guide details how to specify these formats in their documentation. However, color formatting is not currently supported in Looker.

The Adding custom formatting to numeric fields documentation page provides more information on how to use custom formatting.

Auto Resize Value

Enabling the Auto Resize Value option automatically resizes the font on the single value visualization that's displayed within dashboard tiles. Fonts are resized to display at least 8-10 value characters within a tile; if the characters in the visualization overflow horizontally or vertically at a given size, the font size will decrease incrementally. The minimum font size allowed is 14 pixels. Once the minimum font size is reached, any overflowing characters will be truncated with an ellipsis (...). The maximum font size allowed is 104 pixels.

When you're using this feature, single value tiles on dashboards may look less consistent, but more characters will fit on smaller tiles.

This setting has no effect if the Smart Single Value Text Size setting is enabled on the Admin > General Settings page. To use this per-visualization control, the admin-level setting must be disabled.

Show Title

You can determine whether a title appears on the chart. For a saved Look, the default title is the name of the Look. You also can specify a different title by using the Title Override field.

Title Override

You can specify a title to display with the value. This field is available when Show Title is on. For a saved Look, if this field is left empty, the title defaults to the name of the saved Look.

Show Spark Chart

Turn on the Show Spark Chart setting to display a secondary visualization that shows the change of the data value. When this setting is turned on, you can customize the secondary visualization with the following settings:

  • Chart Type: Choose either Area chart or Column chart as the secondary visualization.
  • Chart Color: Choose a color for the secondary visualization, similarly to the Value Color setting.
  • Visible X Axis: Turn this setting on to display X Axis values for the secondary chart.
  • Show Sparkline Tooltip: Turn this setting on for tooltips to appear when users hover over a datapoint in the sparkline.

Custom Tooltip

You can click the Custom Tooltip switch to configure a custom tooltip for the primary value. You can configure the custom tooltip in the Explore visualization editor by using a combination of UI settings and an HTML editor that supports Liquid templating. Learn more about Custom Tooltips.

Comparison menu options

The Comparison menu includes the following options.

Show Comparison

You can turn on the Show Comparison setting to add comparison information from a second field to your KPI (Single Value) visualization. When the Show Comparison setting is enabled, you can use the style options that appear on the Comparison menu.

Comparison Series

The comparison series appears underneath the primary series in the visualization. The settings in this section let you choose the secondary value for comparison, including the following:

  • Comparison Series: Choose a measure from the Explore to set as a comparison series. The value of the selected measure will be the value that is compared against the primary value.
  • Comparison Row: Specify a row's value from the Comparison Series to display. Options include 1st, 2nd, Last, and Total (when Totals are enabled). 1st is selected by default.
  • Value Labels: You can specify how the comparison series is used in the visualization. The options include the following:
    • Show as Value: The value of the comparison series is displayed.
    • Show as Change: The value of the comparison is displayed, with conditional formatting to indicate the type of change compared to the primary series. If the change in value is negative, a triangle points downwards. If the change in value is positive, the triangle points upward. By default, a negative number appears in red with a red triangle, and a positive number appears in green with a green triangle. These colors can be switched by turning on the Positive Values are Bad setting.
    • Show as Percentage Change: The value of the comparison series is displayed with the percentage change compared to the primary series, with conditional formatting that indicates the type of change. If the percentage change in value is negative, a triangle points downwards. If the percentage change in value is positive, the triangle points upward. By default, a negative percentage appears in red with a red triangle, and a positive percentage appears in green with a green triangle. These colors can be switched by turning on the Positive Values are Bad setting.
    • Calculate Progress: The value of the primary field is divided by the comparison field's value, and the percentage appears as a progress bar.
    • Calculate Progress (with Percentage): The value of the primary field is divided by the value of the comparison field. The percentage appears as a progress bar that is labeled with the percentage and the value of the comparison field, such as "83% of $347.8 K". If the Show Label setting is on, then the progress bar also shows the label for the comparison field, such as "83% of $347.8 K Monthly target".
  • Progress Bar Width: You can specify the width of the progress bar in the chart. The options include Full Width or Compact.
  • Progress Bar Color: You can customize the color of the progress bar with the following settings:
    • To pick a color from a palette, click the Palettes tab of the color picker menu, and then use the left and right arrows to scroll through the available palettes. Select a color by clicking on a color in one of the palettes.
    • To select a custom color, click the Custom tab of the palette picker, and then either use the color gradient and value slider to choose a custom color, or enter an RGB hex string, such as #2ca6cd, or CSS color name, such as mediumblue, into the input field.
  • Show Label: Turn on this setting to show a label for the comparison field. By default, the label is the name of the comparison field. If you want to display a different label, enter a new label in the Label field.

Value Format

You can specify the format of the value, independent of the underlying dimension or measure. The field accepts Excel-style formatting. If no formatting is specified, the value displays in the format of the underlying dimension or measure.

MS Excel's complete guide details how to specify these formats in their documentation. However, color formatting is not currently supported in Looker.

The Adding custom formatting to numeric fields documentation page provides more information on how to use custom formatting.

Formatting menu options

Turn on Enable Conditional Formatting to define rules that color code your visualization by specifying values that are of interest.

Colors Collection

A collection lets you create themed visualizations and dashboards that look good together. All of Looker's built-in color collections appear on the Color collections documentation page. Your Looker admin may also create a custom color collection for your organization.

You can choose a color collection from the Colors Collection menu. The palettes that appear for the color swatches in each rule come from that collection.

Include Null Values as Zero

Turn on the Include Null Values as Zero setting to have Looker treat null values as zero. Including null values as zero helps to eliminate mathematical errors in calculations, avoids gaps in your visualizations, and ensures accurate metric aggregation.

Multiple rules

You can have multiple rules for conditional formatting. To add a rule, follow these steps:

  1. To add a rule, click Add Rule.
  2. If you have more than one rule, the rules that are higher on the list have precedence over the rules that are lower on the list. To change the precedence of a rule, click the rule's drag handle and drag the rule higher or lower in the list.
  3. To delete a rule, click Delete Rule.

Format

For each rule, use the Format menu options to select one of the following rule options:

  • between
  • equal to
  • greater than
  • less than
  • not between
  • not equal to
  • not null
  • null

Then, enter comparison values into the text fields that appear, based on your selection. When you enter values into the rule, don't use thousands separators.

Styles

Click the color swatches next to Background color or Font color to open the color picker menu, which lets you pick or customize a color:

  • To pick a color from a palette, click the Palettes tab of the color picker menu, and then use the left and right arrows to scroll through the available palettes. Select a color by clicking on a color in one of the palettes.
  • To select a custom color, click the Custom tab of the palette picker, and then either use the color gradient and value slider to choose a custom color, or enter an RGB hex string, such as #2ca6cd, or CSS color name, such as mediumblue, into the input field.

Now that you know how to create a KPI (Single Value) visualization in Looker, you may want to learn how to do the following: