# @series

## Quick Reference

```sql
-- @series: sales, profit
```

## Valid Values

`List`

A comma separated list of column names from the result set that should be displayed on the chart

## Full Example

```sql
-- @chart: column
-- @title: Series - Basic chart
-- @subtitle: An example of explicitly defining the @series
-- @series: Sales
-- @formats: currency
SELECT 
	TRUNC(date_closed, 'MONTH') as Month,
	sum(amount) as Sales,
    sum(Profit) as Profit
FROM sales
GROUP BY TRUNC(date_closed, 'MONTH')
ORDER BY TRUNC(date_closed, 'MONTH') ASC;
```

<figure><img src="https://4045370218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB0xzzR5x0BnQ6kHixlzd%2Fuploads%2FiF0fICxb4vMsj0ORy9Sx%2Fimage.png?alt=media&#x26;token=2d807007-6b09-47a2-9776-84ea2708745c" alt=""><figcaption><p>An example chart with an explicitly defined series. Columns not added are ignored</p></figcaption></figure>

| MONTH                            | SALES     | PROFIT    |
| -------------------------------- | --------- | --------- |
| January, 01 2017 00:00:00 +0000  | 2668855.0 | 801583.0  |
| February, 01 2017 00:00:00 +0000 | 3951547.0 | 1117761.0 |
| March, 01 2017 00:00:00 +0000    | 4403443.0 | 1224108.0 |
| April, 01 2017 00:00:00 +0000    | 3079040.0 | 862533.0  |
| May, 01 2017 00:00:00 +0000      | 2576305.0 | 631699.0  |
| June, 01 2017 00:00:00 +0000     | 3100093.0 | 870893.0  |
| July, 01 2017 00:00:00 +0000     | 3112476.0 | 871875.0  |
| August, 01 2017 00:00:00 +0000   | 4980193.0 | 1321417.0 |

## Use Cases

You use @series when you need to explicitly control which columns are going to be rendered on the chart. Typically this is necessary when your SQL returns more columns than you wish to display.
