---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/quickstart
  - ru/quickstart
  - href: en/quickstart.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/quickstart.html
title: Getting started with DataLens On-premises
description: >-
  In this tutorial, you will get going with DataLens On-premises: connect to a
  data source, create your first dataset, build several data visualization
  charts, and put them on a dashboard.
vcsPath: en/quickstart.md
---

# Getting started with DataLens On-premises


This section outlines how you can connect to a data source, create your first [dataset](dataset/index.md), build several data visualization [charts](concepts/chart/index.md), and put them on a [dashboard](concepts/dashboard.md).

To get started with DataLens, follow [this deployment guide](./concepts/create-instance.md).



To access the service, you need to [authenticate](security/user-account.md#auth) in DataLens.

If you do not have a DataLens account, contact the administrator.




## Create a workbook {#create-workbook}

In DataLens, all objects are stored in special containers, i.e., [workbooks and collections](./workbooks-collections/index.md):

* A **workbook** stores [connections](./concepts/connection/index.md), [datasets](./dataset/index.md), [charts](./concepts/chart/index.md), and [dashboards](./concepts/dashboard.md).
* A **collection** is a container used for grouping workbooks and other collections.

To create a workbook:

1. Go to the DataLens page.
1. In the top-right corner, click **Create** → **Create workbook**.
1. Enter a name for the workbook: `Quick start`.
1. Click **Create**.


## Create a connection {#create-connection}

[Connections](./concepts/connection/index.md) contain information about data source access parameters, such as the DB host IP address and port. You can create datasets based on connections.

To create a connection:




1. In the top-right corner of the workbook, click **Create** → <!-- diplodoc:svg ![image](_assets/console-icons/thunderbolt.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="m7.836 6 .76-2.027L9.336 2H5.5a.72.72 0 0 0-.664.45L2.513 8.257a.177.177 0 0 0 .164.243h4.965l-.732 2.013-1.082 2.975a.382.382 0 0 0 .637.392l6.956-7.391A.29.29 0 0 0 13.21 6H7.835m2.727-3 .235-.627A1.386 1.386 0 0 0 9.5.5h-4c-.906 0-1.72.552-2.057 1.393L1.12 7.7A1.677 1.677 0 0 0 2.677 10H5.5l-.545 1.5-.537 1.475a1.882 1.882 0 0 0 3.14 1.933l6.956-7.391A1.79 1.79 0 0 0 13.21 4.5H10z" clip-rule="evenodd"/></svg> **Connection**.
1. Select the **ClickHouse®** connection.

   1. In the window that opens, specify the connection parameters:

      * Host name: `rc1a-ckg8nrosr2lim5iz.mdb.yandexcloud.net`.
      * HTTP interface port: `8443` (default).
      * Username: `samples_ro`.
      * Password: `MsgfcjEhJk`.

   1. Enable the **SQL to read** option.
   1. Click **Check connection** and make sure you get a green check mark.
   1. Click **Create connection**.
   1. Enter the connection name: `Sample ClickHouse`.
   1. Click **Create**.


Wait for the connection to be saved.

## Create a dataset {#create-dataset}

A [dataset](./dataset/index.md) describes a set of data and its structure. It is created by connecting to a data source. A dataset is used when creating the following widgets:

* [Charts](./concepts/chart/index.md): To visualize data.
* [Selectors](./dashboard/selector.md): To filter data.

To create a dataset based on the `Sample ClickHouse` connection:

1. In the top-right corner of the connection page, click **Create dataset**.


1. Drag the `MS_SalesMiniTable` table to the workspace.

   ![drag-table](_assets/datalens/quickstart/drag-table-os.png)

1. Navigate to the **Fields** tab.



1. Create a measure for the order amount. To do this, select **Sum** for the `Sales` field in the **Aggregation** column.

   ![dataset-sales-sum](_assets/datalens/quickstart/dataset-sales-sum-os.png)

1. Create a measure for the number of orders:

   1. Rename the `OrderID` field to `OrderCount`: click the field name, delete the current name, and enter the new one.
   1. Select **Number of unique** for the `OrderCount` field in the **Aggregation** column.

1. Change the data type for the `ShopAddressCoord` field: select **Geopoint** in the **Type** column.

   ![dataset-sales-geotype](_assets/datalens/quickstart/dataset-sales-geotype-os.png)

1. Save the dataset:

   1. In the top-right corner, click **Save**.
   1. Enter `Sales Dataset` for the dataset name and click **Create**.

      ![create-dataset](_assets/datalens/quickstart/create-dataset-os.png)

## Create a column chart {#create-column-chart}

A [chart](./concepts/chart/index.md) is a dataset visualization in the form of a table, diagram, or map.

To create a chart based on `Sales Dataset`:

1. Click **Create chart** in the top-right corner of the dataset page.
1. Add the product subcategory to the chart. To do this, drag the `ProductSubcategory` field from **Dimensions** to the **X** section.
1. Add a sales measure to the chart. To do this, drag the `Sales` field from **Measures** to the **Y** section.
1. Sort the chart by sales in descending order by dragging the `Sales` field from **Measures** to the **Sorting** section.
1. Save the chart:

   1. In the top-right corner, click **Save**.
   1. In the window that opens, enter the `Sales by subcategory` name for the chart and click **Save**.

      ![create-chart-1](_assets/datalens/quickstart/create-column-chart-os.png)

## Create an area chart {#create-area-chart}

1. Copy the chart you created in the previous step:

   1. In the top-right corner, click <!-- diplodoc:svg ![save-button](_assets/console-icons/chevron-down.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg> → **Save as copy**.

      ![chart-save-as](_assets/datalens/quickstart/chart-save-as-os.png)

   1. In the window that opens, enter the `Sales by week` name for the new chart and click **Save**.

1. Select **Area chart** as the visualization type.

   ![type-chart-select](_assets/datalens/quickstart/type-chart-select-os.png)

1. Replace the product subcategories with the order date on the X-axis. To do this, drag the `OrderDate` field from **Dimensions** to the **X** section and hold it over the `ProductSubcategory` field until the latter turns red.
1. Add the product category to the chart. To do this, drag the `ProductCategory` field from **Dimensions** to the **Colors** section.
1. Display a week by week chart:

   1. Click the calendar icon next to the `OrderDate` field in the **X** section.
   1. In the **Grouping** field, select **Rounding** → **Week**.

      ![chart-week-grouping](_assets/datalens/quickstart/chart-week-grouping-os.png)

   1. Click **Apply**.

1. Remove sorting by sales: click <!-- diplodoc:svg ![save-button](_assets/console-icons/xmark.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg> (the icon appears when you hover over the field) next to the `Sales` field in the **Sorting** section.
1. In the top-right corner, click **Save**.

   ![create-chart-2](_assets/datalens/quickstart/create-area-chart-os.png)



## Create a pie chart {#create-pie-chart}

1. Copy the chart you created in the previous step:

   1. In the top-right corner, click <!-- diplodoc:svg ![save-button](_assets/console-icons/chevron-down.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg> → **Save as copy**.
   1. In the window that opens, enter the `Sales by category` name for the new chart and click **Save**.

1. Select **Pie chart** as the visualization type.
1. Add the product category to the chart. To do this, drag the `ProductCategory` field from **Dimensions** to the **Color** section.
1. Check that the chart includes the sales measure: the `Sales` field should be located in the **Measures** section. If it is not there, drag it from under **Measures**.
1. Add a measure label:

   1. Drag the `Sales` field from **Measures** to the **Labels** section.
   1. Click the icon to the left of the measure name.
   1. In the window that opens, for **Label value**, select `Percentage` and click **Apply**.

      ![value-as-percentage](_assets/datalens/quickstart/value-as-percentage-os.png)

1. In the top-right corner, click **Save**.

   ![create-chart-3](_assets/datalens/quickstart/create-pie-chart-os.png)


## Create a dashboard and add charts to it {#create-dashboard}

A [dashboard](./concepts/dashboard.md) is a page or multiple pages that contain widgets. It allows you to group your charts in the same place and add [captions](./dashboard/widget.md#text) and [titles](./dashboard/widget.md#title) to them.

To create a dashboard:


1. Go to the `Quick start` workbook by clicking its name in the chart path.

   ![chart-settings](_assets/datalens/quickstart/bread-crumbs-os.png)

1. In the top-right corner, click **Create** → <!-- diplodoc:svg ![image](_assets/console-icons/layout-cells-large.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M12 3.5H8.75v3.75h4.75V5A1.5 1.5 0 0 0 12 3.5m1.5 5.25H8.75v3.75H12a1.5 1.5 0 0 0 1.5-1.5zm-6.25-1.5V3.5H4A1.5 1.5 0 0 0 2.5 5v2.25zM2.5 8.75h4.75v3.75H4A1.5 1.5 0 0 1 2.5 11zM4 2a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3z" clip-rule="evenodd"/></svg> **Dashboard**.



1. In the panel at the bottom of the page, click <!-- diplodoc:svg ![image](_assets/console-icons/chart-column.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><g clip-path="url(#svg-l39k14sd__a)"><path fill="currentColor" fill-rule="evenodd" d="M11.5 3.5h2a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5m-2.5 9a.5.5 0 0 0 .5-.5V7a.5.5 0 0 0-.5-.5H7a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5zm-4.5 0A.5.5 0 0 0 5 12v-2a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5zm-1 1.5h-1a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2q.26 0 .5.063V7a2 2 0 0 1 2-2h2q.26 0 .5.063V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2z" clip-rule="evenodd"/></g><defs><clipPath id="svg-l39k14sd__a"><path fill="currentColor" d="M0 0h16v16H0z"/></clipPath></defs></svg> **Chart** and drag it to a desired location.
1. In the window that opens, click **Select**.
1. Select the `Sales by subcategory` chart.

   ![chart-settings](_assets/datalens/quickstart/chart-settings-os.png)

1. Click **Add**.
1. Repeat steps 3 through 6 to add the `Sales by week` and `Sales by subcategory` charts.
1. Adjust the size of the charts with your mouse and place them on the dashboard as you prefer.

   ![chart-settings](_assets/datalens/quickstart/add-charts-os.png)

## Set up chart filtering {#add-chart-chart-filtration}



Add [filtering](./dashboard/chart-chart-filtration.md) by the `Sales by subcategory` chart to the dashboard to filter other charts:

1. Click <!-- diplodoc:svg ![image](_assets/console-icons/gear.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0" clip-rule="evenodd"/></svg> in the top-right corner of the `Sales by subcategory` chart.

   ![chart-settings](_assets/datalens/quickstart/chart-dash-settings-os.png)

1. Enable **Filtering**.

   ![chart-filtration-option](_assets/datalens/quickstart/chart-filtration-option-os.png)

1. Click **Save**.


By default, the chart used for filtering filters data in all charts on the current dashboard tab that share the same dataset.

## Add a selector to the dashboard {#add-selectors}

[Selectors](./dashboard/selector.md) are filters that affect the results of queries in the linked widgets.

To add a selector to a dashboard:

1. In the panel at the bottom of the page, click <!-- diplodoc:svg ![image](_assets/console-icons/sliders.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.5 5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m1.405.75a3.001 3.001 0 0 1-5.81 0H1.747a.75.75 0 0 1 0-1.5h1.348a3.001 3.001 0 0 1 5.81 0h5.345a.75.75 0 0 1 0 1.5zm-7.158 4.5h5.345a3.001 3.001 0 0 1 5.811 0h1.347a.75.75 0 1 1 0 1.5h-1.347a3.001 3.001 0 0 1-5.81 0H1.746a.75.75 0 0 1 0-1.5m8.25-.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3" clip-rule="evenodd"/></svg> **Selector** and drag it to a desired location.
1. Add the calendar selector for the order date:

   1. Select `Sales Dataset`.
   1. Select the `OrderDate` field.
   1. In the **Header** field, enter `Order date`.
   1. Enable **Range**.

      ![selector-settings](_assets/datalens/quickstart/selector-settings-os.png)

   1. Click **Save**.

1. Position the selector on the dashboard wherever you like.
1. Save the dashboard:

   1. In the top-right corner of the dashboard, click **Save**.
   1. Enter `Sales` for the dashboard name and click **Create**.

      ![add-selectors](_assets/datalens/quickstart/dashboard-saved-os.png)

## Learn how a dashboard works {#dashboard-work}



1. Apply cross-chart filtering on the dashboard:

   1. In the `Sales by subcategory` chart, click the column with the `Kitchen appliances` value. This will filter the linked charts by the selected dimension.

      ![chart-chart-filtration](_assets/datalens/quickstart/chart-chart-filtration-os.png)

   1. Clear chart filtering by clicking the selected item once more or <!-- diplodoc:svg ![image](_assets/datalens/clear-filters.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" aria-hidden="true" class="yc-icon widget-header__icon-filter-clear"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 16"><path fill="currentColor" fill-rule="evenodd" d="M10.055 7.602 8.31 10.16a.354.354 0 0 0-.061.2v2.39c0 1.5-1.25 2.5-2.75 2.5s-1.75-1-1.75-1v-3.89a.354.354 0 0 0-.061-.2L.562 5.577A3.242 3.242 0 0 1 0 3.75c0-2 2.686-3 6-3 .461 0 .91.02 1.341.059a2.24 2.24 0 0 0-.323 1.478A13.777 13.777 0 0 0 6 2.25c-1.538 0-2.799.237-3.615.613-.814.375-.885.713-.885.887 0 .175.071.513.885.888.816.376 2.077.612 3.615.612.355 0 .695-.012 1.018-.036a2.24 2.24 0 0 0 .323 1.478c-.43.04-.88.058-1.341.058-1.114 0-2.158-.113-3.052-.339l1.98 2.904c.21.308.322.672.322 1.045v3.37c.06.011.141.02.25.02.422 0 .749-.14.95-.316a.86.86 0 0 0 .3-.683V10.36c0-.373.112-.737.322-1.045l1.214-1.78a2.241 2.241 0 0 0 1.77.067Zm-4.936 6.085c-.01-.006-.013-.01-.013-.01s.005.002.013.01Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M9.278.97a.75.75 0 0 0-1.06 1.06l1.72 1.72-1.72 1.72a.75.75 0 0 0 1.06 1.062L11 4.812l1.72 1.72a.75.75 0 1 0 1.06-1.062l-1.72-1.72 1.72-1.721A.75.75 0 0 0 12.72.97l-1.721 1.72L9.279.97Z" clip-rule="evenodd"/></svg></svg> in the top-right corner of the chart.

1. Use the `Order date` selector:

   1. In the `Order date` selector, enter the period start and end dates: `01.01.2019 - 31.01.2019`.
   1. This will filter data by the `OrderDate` field in all charts on the current tab that share the same dataset.

      ![selector-filtration](_assets/datalens/quickstart/selector-filtration-os.png)

   1. Clear selector filtering by clicking <!-- diplodoc:svg ![save-button](_assets/console-icons/xmark.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg> in the right corner of the selector.



## What's next {#whats-next}

* Read about [service concepts](./concepts/index.md).
* View an [example of a ready-to-use dashboard](https://datalens.yandex/9fms9uae7ip02).

<!-- source: en/_includes/clickhouse-disclaimer.md -->
_ClickHouse® is a registered trademark of [ClickHouse, Inc](https://clickhouse.com)._
<!-- endsource: en/_includes/clickhouse-disclaimer.md -->
