@baselines

Horizontal marks added to charts to mark major comparative values of a series like the average, median, min or max.

Quick Reference

-- @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

circle-info

See also @baseline-types for defining if the baseline is an average, median, min or max

Full Example

-- @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

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

Last updated