Skip to main content
Basic Usage
{% big_value
  data="demo_daily_orders"
  value="sum(total_sales)"
  fmt="usd1m"
/%}

Examples

Basic Usage

Basic Usage
{% big_value
  data="demo_daily_orders"
  value="sum(total_sales)"
  fmt="usd1m"
/%}

Comparison

Comparison
{% big_value
	data="demo_daily_orders"
	value="sum(total_sales)"
	fmt="usd1m"
	date_range={
		date="date"
		range="last 12 months"
	}
	comparison={
		compare_vs="prior year"
	}
/%}

Sparkline

Sparkline
{% big_value
	data="demo_daily_orders"
	value="sum(total_sales)"
	fmt="usd1m"
	sparkline={
		type="line"
		x="date"
	}
/%}

Attributes

data
string
required
Table or view to query
value
string
required
The column name for the main value to display
date_range
options group
Use date_range to filter data for specific time periods. Accepts predefined ranges (e.g., “last 12 months”), dynamic ranges (e.g., “Last 90 days”), custom date ranges (e.g., “2020-01-01 to 2023-03-01”), or partial ranges (e.g., “from 2020-01-01”, “until 2023-03-01”)Example:
date_range={
  range = "last 7 days"
  date = "string"
}
Attributes:
  • range: string - Time period to filter. Use presets like ‘last 7 days’, dynamic patterns like ‘Last 90 days’, custom ranges like ‘2020-01-01 to 2023-03-01’, or partial ranges like ‘from 2020-01-01’.
    • Allowed values:
      • last 7 days
      • last 30 days
      • last 3 months
      • last 6 months
      • last 12 months
      • week to date
      • month to date
      • quarter to date
      • year to date
      • previous week
      • previous month
      • previous quarter
      • previous year
      • all time
  • date: string - Date column to filter on. Required when the data has multiple date columns.
comparison
options group
Comparison configuration objectExample:
comparison={
  compare_vs = "prior year"
  display_type = "compared_value"
  target = "string"
  benchmark = { ... }
  hide_pct = true
  pct_fmt = "string"
  abs_fmt = "string"
  text = "string"
  delta = true
  down_is_good = true
  neutral_range = []
}
Attributes:
  • compare_vs: string - Type of comparison to perform. Options: prior year (same period last year), prior period (previous period of same duration), target (compare against a target value), benchmark (compare against group average/aggregate)
    • Allowed values:
      • prior year
      • prior period
      • target
      • benchmark
  • display_type: string - What to display for comparison. Options: compared_value (comparison period value), abs (absolute change), pct (percentage change). Default: pct
    • Allowed values:
      • compared_value
      • abs
      • pct
  • target: string - Target value for target comparison. Can be a column name, aggregation (e.g., “sum(target_sales)”), or literal value.
  • benchmark: options group
  • hide_pct: boolean - Hide the percentage change line in comparison tooltips
  • pct_fmt: string - Format code for percentage values in comparison tooltips
  • abs_fmt: string - Format code for absolute values in comparison tooltips
  • text: string - Text displayed after the comparison value
  • delta: boolean - Whether to display the comparison as a delta
  • down_is_good: boolean - Whether a decrease is considered positive
  • neutral_range: array - Range [min, max] for neutral values. Use null for infinity (e.g., [null, 0] means anything ≤ 0 is neutral)
sparkline
options group
Sparkline configuration objectExample:
sparkline={
  type = "line"
  color = "string"
  x = "string"
  y_fmt = "string"
  x_fmt = "string"
  fit_to_data = true
  connect_group = "string"
  date_grain = "year"
  date_range = { ... }
}
Attributes:
  • type: string - The type of sparkline to display
    • Allowed values:
      • line
      • area
      • bar
  • color: string - Color for the sparkline
  • x: string - X column for the sparkline
  • y_fmt: string - Value format for the sparkline tooltips
  • x_fmt: string - Date format for the sparkline tooltips
  • fit_to_data: boolean - Whether to fit the Y axis scale to the data range
  • connect_group: string - Connect group for the sparkline
  • date_grain: string - Time grain for the sparkline data points
    • Allowed values:
      • year
      • quarter
      • month
      • week
      • day
      • hour
      • minute
  • date_range: options group
fmt
string
Format for the main value. See Value Formatting for available formats.
title
string
Title for the main value
max_width
string
default:"fit-content"
Maximum width of the component
min_width
string
default:"auto"
Minimum width of the component
title_class
string
Additional CSS classes for the title
value_class
string
Additional CSS classes for the value
URL to link the value to
info
string
Information tooltip text
URL to link the info text to (can only be used with info)
Create a custom link title for the info link, placed after the info text (can only be used with info_link)
filters
array
IDs of filters to apply to the query
where
string
Custom SQL WHERE condition to apply to the query. For date filters, use date_range instead.
having
string
Custom SQL HAVING condition to apply to the query after GROUP BY
limit
number
Maximum number of rows to return from the query. Note: When used with tables, limit will disable subtotals to prevent incomplete subtotal rows.
order
string
Column name(s) with optional direction (e.g. “column_name”, “column_name desc”)
qualify
string
Custom SQL QUALIFY condition to filter windowed results
class_name
string
Additional CSS classes for the component
width
number
Set the width of this component (in percent) relative to the page width