@baseline-types

Determines the type of baseline to use in conjunction with the @baselines directive

Quick Reference

-- @baseline-types: min, max, average, median

Valid Values

List

A comma separated list of types that matches the order of columns defined in @baselines

  • average

  • min

  • max

  • median

Used in conjunction with @baselines

Full Example

-- @chart: column
-- @title: Baselines - Multiple Baseline Types on one Series
-- @subtitle: An example column chart showing sales by month
-- @formats: currency
-- @series: Sales
-- @baselines: Sales, Sales, Sales
-- @baseline-types: average, min, max
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

By default, 'average' is used for all baselines. You use baseline-types to override when you want something other than average.

Example Charts

Last updated

Support

DiscordX

ChartSQL