Plot two time series

Hello everyone,

I am trying to plot two time series in Grafana reading the data from Elasticsearch.
The structure of my document is the following:

{
  "sensorName": "Sensor1",
  "values": [
    {
      "feature": {
        "key": "feature1",
        "value": 67
      }
    },
    {
      "feature": {
        "key": "feature2",
        "value": 15
      }
    }
  ],
  "timestamp": 1631519919904
}

I want to plot one time series for the values in the first element of the array (the one with “key”=“feature1”) and another time series for the second element of the array (“key”=“feature2”).

I tried the group by operation on the field values.feature.key but it doesn’t work because Grafana averages the two values (the two fields values.feature.value) for each timestep.

How can I fix the visualization?

Thank you for your help.

Hi @maccn and welcome to the forum :wave:

Can you share a few more details? That way there is a better chance that someone here can help you out. Are you using the Elasticsearch datasource that is packaged with Grafana? What version of Grafana are you using? What is your query?