> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evidence.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Big Value

> Display a big value with optional comparison, delta, and sparkline

<img src="https://mintcdn.com/evidence/Z2CIIsynbphd2HX3/images/components/big_value/big_value.png?fit=max&auto=format&n=Z2CIIsynbphd2HX3&q=85&s=07a67a4d9c58570d4d3db0638fd47999" alt="Basic Usage" width="1000" height="132" data-path="images/components/big_value/big_value.png" />

```liquid theme={null}
{% big_value
  data="demo.daily_orders"
  value="sum(total_sales)"
  fmt="usd1m"
/%}
```

## Examples

### Basic Usage

<img src="https://mintcdn.com/evidence/Z2CIIsynbphd2HX3/images/components/big_value/big_value.png?fit=max&auto=format&n=Z2CIIsynbphd2HX3&q=85&s=07a67a4d9c58570d4d3db0638fd47999" alt="Basic Usage" width="1000" height="132" data-path="images/components/big_value/big_value.png" />

```liquid theme={null}
{% big_value
  data="demo.daily_orders"
  value="sum(total_sales)"
  fmt="usd1m"
/%}
```

### Comparison

<img src="https://mintcdn.com/evidence/qxp1vq5RbQ6sDlcg/images/components/big_value/example-1.png?fit=max&auto=format&n=qxp1vq5RbQ6sDlcg&q=85&s=61552571ba248ab0fb44c3f9dec439b3" alt="Comparison" width="1000" height="164" data-path="images/components/big_value/example-1.png" />

```liquid theme={null}
{% 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

<img src="https://mintcdn.com/evidence/Z2CIIsynbphd2HX3/images/components/big_value/example-2.png?fit=max&auto=format&n=Z2CIIsynbphd2HX3&q=85&s=7d24595d05d954cba9f3381a11655d12" alt="Sparkline" width="1000" height="132" data-path="images/components/big_value/example-2.png" />

```liquid theme={null}
{% big_value
	data="demo.daily_orders"
	value="sum(total_sales)"
	fmt="usd1m"
	sparkline={
		type="line"
		x="date"
	}
/%}
```

### Text Size

<img src="https://mintcdn.com/evidence/Z2CIIsynbphd2HX3/images/components/big_value/example-3.png?fit=max&auto=format&n=Z2CIIsynbphd2HX3&q=85&s=4d920c0ab114633cc478a65e7c6f43c8" alt="Text Size" width="1000" height="156" data-path="images/components/big_value/example-3.png" />

```liquid theme={null}
{% big_value
	data="demo.daily_orders"
	value="sum(total_sales)"
	fmt="usd1m"
	text_size="4xl"
/%}
```

## Attributes

<ResponseField name="data" type="string" required>
  Table or view to query
</ResponseField>

<ResponseField name="value" type="string" required>
  The column name for the main value to display
</ResponseField>

<ResponseField name="date_range" type="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 = "today"
    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:**
      * `today`
      * `yesterday`
      * `last 7 days`
      * `last 30 days`
      * `last 3 months`
      * `last 6 months`
      * `last 12 months`
      * `previous week`
      * `previous month`
      * `previous quarter`
      * `previous year`
      * `this week`
      * `this month`
      * `this quarter`
      * `this year`
      * `next week`
      * `next month`
      * `next quarter`
      * `next year`
      * `week to date`
      * `month to date`
      * `quarter to date`
      * `year to date`
      * `all time`
  * date: `string` - Date column to filter on. Required when the data has multiple date columns.
</ResponseField>

<ResponseField name="comparison" type="options group">
  Comparison configuration object

  **Example:**

  ```
  comparison={
    compare_vs = "prior year"
    display_type = "compared_value"
    target = "string"
    benchmark = {
      agg = "avg"
      subject = "store_name"
      within = ["region"]
    }
    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`
    * **Options:**
      * agg: `string` - Aggregation function to apply across benchmark group. Options: avg (average), median, min, max, sum, count, count\_distinct
        * **Allowed values:**
          * `avg`
          * `median`
          * `min`
          * `max`
          * `sum`
          * `count`
          * `count_distinct`
      * subject: `string` - Column or expression that defines individual entities in the benchmark (e.g., "store\_name", "customer\_id"). Required for single-value components.
      * value: `string` - Optional column or expression to use for benchmark calculation. If not specified, uses the main value column. Useful if you have a pre-aggregated benchmark table for RLS reasons.
      * within: `array of strings` - Dimension columns to group the benchmark by (e.g., \["region"]). Leave empty for dataset-wide benchmark.
      * where: `string` - SQL WHERE clause to filter which entities are included in the benchmark
      * exclude\_self: `boolean` - Exclude the current row from its own benchmark calculation (table context only). Default: false
  * 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)
</ResponseField>

<ResponseField name="sparkline" type="options group">
  Sparkline configuration object

  **Example:**

  ```
  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 = {
      range = "today"
      date = "string"
    }
  }
  ```

  **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`
    * **Options:**
      * 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:**
          * `today`
          * `yesterday`
          * `last 7 days`
          * `last 30 days`
          * `last 3 months`
          * `last 6 months`
          * `last 12 months`
          * `previous week`
          * `previous month`
          * `previous quarter`
          * `previous year`
          * `this week`
          * `this month`
          * `this quarter`
          * `this year`
          * `next week`
          * `next month`
          * `next quarter`
          * `next year`
          * `week to date`
          * `month to date`
          * `quarter to date`
          * `year to date`
          * `all time`
      * date: `string` - Date column to filter on. Required when the data has multiple date columns.
</ResponseField>

<ResponseField name="fmt" type="string">
  Format for the main value. See [Value Formatting](/core-concepts/value-formatting) for available formats.
</ResponseField>

<ResponseField name="title" type="string">
  Title for the main value
</ResponseField>

<ResponseField name="max_width" type="string" default="fit-content">
  Maximum width of the component
</ResponseField>

<ResponseField name="min_width" type="string" default="auto">
  Minimum width of the component
</ResponseField>

<ResponseField name="text_size" type="string">
  Text size for the value. Options: sm, base, lg, xl (default), 2xl, 3xl, 4xl, 5xl

  **Allowed values:**

  * `sm`
  * `base`
  * `lg`
  * `xl`
  * `2xl`
  * `3xl`
  * `4xl`
  * `5xl`
</ResponseField>

<ResponseField name="title_class" type="string">
  Additional CSS classes for the title
</ResponseField>

<ResponseField name="value_class" type="string">
  Additional CSS classes for the value
</ResponseField>

<ResponseField name="link" type="string">
  URL to link the value to
</ResponseField>

<ResponseField name="info" type="string">
  Information tooltip text
</ResponseField>

<ResponseField name="info_link" type="string">
  URL to link the info text to (can only be used with info)
</ResponseField>

<ResponseField name="info_link_title" type="string">
  Create a custom link title for the info link, placed after the info text (can only be used with info\_link)
</ResponseField>

<ResponseField name="filters" type="array">
  IDs of filters to apply to the query
</ResponseField>

<ResponseField name="where" type="string">
  Custom SQL WHERE condition to apply to the query. For date filters, use date\_range instead.
</ResponseField>

<ResponseField name="having" type="string">
  Custom SQL HAVING condition to apply to the query after GROUP BY
</ResponseField>

<ResponseField name="limit" type="number">
  Maximum number of rows to return from the query. Note: When used with tables, limit will disable subtotals to prevent incomplete subtotal rows.
</ResponseField>

<ResponseField name="order" type="string">
  Column name(s) with optional direction (e.g. "column\_name", "column\_name desc")
</ResponseField>

<ResponseField name="qualify" type="string">
  Custom SQL QUALIFY condition to filter windowed results
</ResponseField>

<ResponseField name="class_name" type="string">
  Additional CSS classes for the component
</ResponseField>

<ResponseField name="refresh_interval" type="number">
  Time in seconds between automatic data refreshes (minimum 60). Overrides the page-level auto-refresh setting for this component.
</ResponseField>

<ResponseField name="width" type="number">
  Set the width of this component (in percent) relative to the page width
</ResponseField>
