# @baselines

## Quick Reference

```sql
-- @baselines: Amount, UnitsSold 
```

## Valid Values

`List`

Baselines must be a comma separated list of columns that map to the columns used within the @series or @secondary-series

{% hint style="info" %}
See also [@baseline-types](/reference/directives/baseline-types.md) for defining if the baseline is an average, median, min or max
{% endhint %}

## Full Example

```sql
-- @chart: column
-- @title: Baselines - Average Baseline
-- @subtitle: An example column chart showing sales by month
-- @formats: currency
-- @series: Sales
-- @baselines: Sales
SELECT 
	TRUNC(date_closed, 'MONTH') as Month,
	sum(amount) as Sales
FROM sales
GROUP BY TRUNC(date_closed, 'MONTH')
ORDER BY TRUNC(date_closed, 'MONTH') ASC
```

<figure><img src="/files/gwKyBu3l6WXw4tYFqzrc" alt=""><figcaption></figcaption></figure>

## Use Cases

Baselines are good to show how a series value compares to to the average, min, max or median of the whole set. It helps give some context to the series data.

## Example Charts

<table data-view="cards"><thead><tr><th data-card-target data-type="content-ref"></th><th data-hidden></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="/pages/XLVj0yEk4zl6Ziw7DfcD">/pages/XLVj0yEk4zl6Ziw7DfcD</a></td><td></td><td></td><td></td><td><a href="/files/gwKyBu3l6WXw4tYFqzrc">/files/gwKyBu3l6WXw4tYFqzrc</a></td></tr><tr><td><a href="/pages/XLVj0yEk4zl6Ziw7DfcD#multiple-baselines-for-one-series">/pages/XLVj0yEk4zl6Ziw7DfcD#multiple-baselines-for-one-series</a></td><td></td><td></td><td></td><td><a href="/files/hA04UBtxTjnjlOkhClf9">/files/hA04UBtxTjnjlOkhClf9</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chartsql.com/reference/directives/baselines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
