Skip to Content

Chart types

Set up a single value card

Show one headline number, with a comparison, color rules and a sub-header.

Show one number on a card, for example total revenue.

What the data needs

One column. Databrain uses the first measure, or the first dimension if there is no measure. The card shows the first row only, so make the query return one row.

Steps

  1. Add one field to Measures, for example sum(revenue).

  2. In the chart toolbar, select Chart type, then Single Value.

    Chart type picker in the metric builder with the Single Value tile highlighted
    Single Value in the Chart type picker.
  3. Select Appearance.

  4. In Number format, set Value format and Decimal places.

    Chart settings for a Single Value card with Value format highlighted
    Value format is at the top of Chart settings.
  5. Open Customizations and set the Prefix, Suffix and Max font size.

    Customizations section with Prefix set to $, highlighted, and the card preview showing $2.84B
    Prefix and Suffix are in Customizations. The preview shows the result.
  6. Select Done.

The card shows the formatted number.

Add a sub-header

  1. In Customizations, turn on Customize sub-header.

    Chart settings Customizations section with the Customize sub-header switch on, highlighted
    The sub-header sits under the value.
  2. Enter the Sub-header text. It saves when you press Enter or leave the field.

    Sub-header text field with Total revenue, all regions, highlighted, and the preview showing it under 434.49k
    The preview updates as you type.
  3. Set the Sub-header alignment, Font size, Font weight and Font color.

    Sub-header settings with alignment, font size, font weight and font color highlighted, and the sub-header left aligned in the preview
    Align the sub-header with the value.

Compare with an earlier period

Comparison value shows only when the measure has an aggregate, such as SUM.

  1. Open Comparison value and turn on Show comparison value.

    Chart settings with the Comparison value section and its switch on, highlighted
    Turn it on to see the comparison options.
  2. Choose the Time column and the Time grain, for example order_date and Quarter.

    Comparison value options with Time column order_date highlighted and Time grain set to Quarter
    The time column decides which period the value covers.
  3. In Show change as, choose Percentage or Difference.

    Show change as with Percentage selected and Difference, highlighted
    Percentage or the plain difference.
  4. Select Save. It is available once Time column, Time grain and a Comparison period lag above 0 are set.

    Save button highlighted at the end of the Comparison value options, and the preview showing vs Last 1 quarter and -59.40 %
    The card now shows the change against the last quarter.

Other options: Enable year over year, Comparison period lag, Comparison suffix, Indicator color, Trendline and Bypass comparison when date is not set.

Color the value with a rule

  1. Open Conditional formatting and select Add rule.

    Chart settings with Add rule highlighted next to Conditional formatting
    Add rule opens a new rule form.
  2. Choose a Rule type: Range or String.

    New rule form with Rule type Range and String highlighted
    Range compares numbers; String compares text.
  3. For a range, enter the Min value and Max value. For a string, choose the Condition and enter the Text.

    New rule form with Min value 0 and Max value 60000 highlighted
    The rule applies when the value is in this range.
  4. Choose the Font color.

    New rule form with Font color #DC2626 highlighted
    The value takes this color when the rule matches.
  5. Select Save rule.

    Saved rule 0 - 60000 highlighted in Conditional formatting, and the preview showing 52.54k in red
    The value turns red because it is under 60,000.

Other settings

  • Card color sets a background color for the card.
  • Actions has Custom Underlying Data and Alerts and Signals. Chart actions

To show a calculation from other metrics, see metric expression.