[Yandex Cloud documentation](../../../index.md) > [Yandex DataLens](../../index.md) > Charts > Wizard charts > Step-by-step guides > Replacing a dataset in a chart

# Replacing a dataset in a Yandex DataLens chart

To replace a dataset in a chart:


{% note warning %}

If you use the new DataLens object model with [workbooks and collections](../../workbooks-collections/index.md):

1. In the left-hand panel, select ![collections](../../../_assets/console-icons/rectangles-4.svg) **Collections and workbooks**.
1. Open the workbook you need and select an object.

Proceed with this guide from Step 2.

{% endnote %}


1. In the left-hand panel, click ![image](../../../_assets/console-icons/chart-column.svg) **Charts** and select the chart you need.
1. On the left side of the screen, click ![image](../../../_assets/console-icons/ellipsis.svg) next to the dataset and select **Replace dataset**.
1. Select another dataset.

   {% note info %}

   Make sure the new dataset contains fields with the same names as the old one. If, after you replace the dataset, the chart comes with the `ERR.DS_API.DB.COLUMN_DOES_NOT_EXIST` error, follow [this guide](../../dataset/create-dataset.md#update-fields).

   {% endnote %}

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