> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Dashboards

> The SQL Console's dashboards feature allows you to collect and share visualizations from saved queries.

The SQL Console's dashboards feature allows you to collect and share visualizations from saved queries. Get started by saving and visualizing queries, adding query visualizations to a dashboard, and making the dashboard interactive using query parameters.

## Core concepts

### Query sharing

To share your dashboard with colleagues, be sure to share the underlying saved query. To view a visualization, you must have, at a minimum, read-only access to the underlying saved query.

### Interactivity

Use [query parameters](https://clickhouse.com/docs/reference/syntax.md#defining-and-using-query-parameters) to make your dashboard interactive. For instance, you can add a query parameter to a `WHERE` clause to function as a filter.

You can toggle the query parameter input via the **Global** filters side pane by selecting a “filter” type in the visualization settings. You can also toggle the query parameter input by linking to another object (like a table) on the dashboard. Please see the “[configure a filter](https://clickhouse.com/docs/products/cloud/features/sql-console-features/dashboards.md#configure-a-filter)” section of the quick start guide below.

## Quick start

Let's create a dashboard to monitor our ClickHouse service using the [query\_log](https://clickhouse.com/docs/reference/system-tables/query_log.md) system table.

## Quick start

### Create a saved query

If you already have saved queries to visualize, you can skip this step.

Open a new query tab. Let's write a query to count query volume by day on a service using ClickHouse system tables:

![Create a saved query](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/2_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=fc8d33f3c53a6ca5a185f3f0ec983265)

We can view the results of the query in table format or start building visualizations from the chart view. For the next step, we'll go ahead and save the query as `queries over time`:

![Save query](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/3_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=4c38086e77c659a01b7a207ad7b90d84)

More documentation around saved queries can be found in the [Saving a Query section](https://clickhouse.com/docs/products/cloud/features/sql-console-features/sql-console.md#saving-a-query).

We can create and save another query, `query count by query kind`, to count the number of queries by query kind. Here's a bar chart visualization of the data in the SQL console.

![A bar chart visualization of a query's results](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/4_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=50698f228a95bbf4c131763338282349)

Now that there's two queries, let's create a dashboard to visualize and collect these queries.

### Create a dashboard

Navigate to the Dashboards panel, and hit “New Dashboard”. After you assign a name, you'll have successfully created your first dashboard!

![Create a new dashboard](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/5_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=596a93cce9e58afcdc0d0f5bee0db061)

### Add a visualization

There's two saved queries, `queries over time` and `query count by query kind`. Let's visualize the first as a line chart. Give your visualization a title and subtitle, and select the query to visualize. Next, select the “Line” chart type, and assign an x and y axis.

![Add a visualization](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/6_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=dd8ddb3578644c5bed934426ce412a7a)

Here, additional stylistic changes can also be made - like number formatting, legend layout, and axis labels.

Next, let's visualize the second query as a table, and position it below the line chart.

![Visualize query results as a table](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/7_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=571f512a534e2887b42a6a0c91d8ea5f)

You've created your first dashboard by visualizing two saved queries!

### Configure a filter

Let's make this dashboard interactive by adding a filter on query kind so you can display just the trends related to Insert queries. We'll accomplish this task using [query parameters](https://clickhouse.com/docs/reference/syntax.md#defining-and-using-query-parameters).

Click on the three dots next to the line chart, and click on the pencil button next to the query to open the in-line query editor. Here, we can edit the underlying saved query directly from the dashboard.

![Edit the underlying query](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/8_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=6fca749163ee0fc94b00b2a6aff32bf9)

Now, when the yellow run query button is pressed, you'll see the same query from earlier filtered on just insert queries. Click on the save button to update the query. When you return to the chart settings, you'll be able to filter the line chart.

Now, using Global Filters on the top ribbon, you can toggle the filter by changing the input.

![Adjust global filters](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/9_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=c6c46d7498f3edb6d4e0f110c2c49905)

Suppose you want to link the line chart's filter to the table. You can do this by going back to the visualization settings, and changing the query\_kind query parameter' value source to a table, and selecting the query\_kind column as the field to link.

![Changing query parameter](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/10_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=8358f7c6fbb584b2f3710295b1319bd4)

Now, you can control the filter on the line chart directly from the queries by kind table to make your dashboard interactive.

![Control the filter on the line chart](https://mintcdn.com/private-7c7dfe99/i3Gw7HRb0YxPr7dq/images/cloud/dashboards/11_dashboards.webp?fit=max\&auto=format\&n=i3Gw7HRb0YxPr7dq\&q=85\&s=3d3cbc1ea94ef9ff74f72d8fa02d8a13)
