How to display a multiple series chart with history of products costs?

Hi all!
I have a sql view that refer to a table structured like this one:

Product ID, Cost   , Date
1         , 1.2 EUR, 2020-01-04
2         , 2.2 EUR, 2021-01-06
1         , 1.5 EUR, 2021-09-04
2         , 2.2 EUR, 2021-01-09
1         , 2.2 EUR, 2022-02-07
1         , 3.4 EUR, 2020-01-04
3         , 1.0 EUR, 2022-09-02

How I can display a chart (X =Date, Y = Cost) with a serie for each product for compare the trend of the cost of each product?

I'm using Metabase v0.46.1.

Thank you very much!

Thanks to ChatGPT I solved. Here the solution:

To display a multiple series chart with the history of product costs using Metabase, you can follow these steps:

  1. Create a new question in Metabase and select the SQL editor.
  2. Copy and paste your SQL query that selects the Product ID, Cost, and Date columns from your table.
  3. In the visualization section, select the "Line" chart type.
  4. Drag the Date column to the "X" axis and the Cost column to the "Y" axis.
  5. Click on the "Series" button and drag the Product ID column to the "Series" field.
  6. Click on the "Preview" button to see your chart.

This will display a line chart with a series for each product, where the X-axis represents the date and Y-axis represents the cost. You can compare the trend of the cost of each product over time.

Where I can find the "Series" button?

The "Series" button is located in the visualization section of the Metabase query builder.

After you have selected the "Line" chart type, you should see a "Visualization" section on the right side of the query builder. In this section, there is a button labeled "Series".

Clicking on this button will open up a dropdown menu where you can select the column that you want to use to group your data into series. In this case, you would select the "Product ID" column to create a series for each product.