> For the complete documentation index, see [llms.txt](https://docs.chartsql.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chartsql.com/reference/directives/category.md).

# @category

## Quick Reference

```sql
-- @category: Month
```

## Valid Values

`One Of`

Must be a column name from the result set

## Full Example

```sql
-- @chart: Line
-- @title: Line - Sales by Month
-- @subtitle: An example line chart showing sales by month
-- @category: Month
-- @formats: currency
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/qVJdTrtpTlh9eOC3thkP" alt=""><figcaption></figcaption></figure>

<details>

<summary>Sample Data</summary>

<img src="/files/O6X7Q5NEtUZc8FGBgu1x" alt="" data-size="original">

</details>

## Use Cases

When you do not want the @category columns auto-detected, you specify @category to pick the particular columns that you want used on the main axis.
