Single line for multiple matrics

I am using 2 matrics and i am able to see one line for both matrics.i want to display both matrics in two different lines.

first matrics Sum(field1)
2nd matrics sum(field2)
Group by field3 order by term value
then Date Histogram

Elasticsearch cannot do this currently.

Thanks for quick reply.
i want to display both matrics in two different lines.

i was checking this sample… here we have one matrics and 2 lines…

i also tried extended stats.still only single line.

can you show a screenshot of your query?

i have 2 terms in matrics sum
one term in group

all 3 terms doesn’t have null values.

Try changing min doc count to 1 on terms and date histogram, also select a field name, also show me the graph if you can so I can understand your problem better

I tried with min doc count =1

x-axis mode= series

Matric 1 field is integer(>=0)
matric 2 field is integer (>=0)
first group by field value is (>-1)

As you can see in the graph i am getting 2 same x-coordinates and same line for both matrics values.

I can’t see the legend in your screenshot but after testing myself, if you have the same aggregation (sum in your case) then Grafana does not handle it as well as it should for legends.

Try adding this to the Alias field and change your_term to the name of your term:

{{your_term}} {{metric}} {{field}}

Then you should be able to see multiple value here depending on how many term values you have. When I tested a query on the play site that looks like this:

Then the @hostname term had 2 values server1 and server2 and the legend looked like this:

field f1 ( 20164) has 2 values Sum Dx max value:0 and SUM Nx max value:0

Please let me know if you need more information.

In the Axes tab what value have you chosen for X-Axis mode? Maybe try changing it to Time instead of Series?

I changed x-axis mode from series to time.

Still single line for both matrics.

Looks like one series has a value of around 50000 while the other series have small values. Try deselecting the series starting with 20153 by pressing CTRL + left mouse click on the series name in the legend. Can you see the other values now?

You might want to use log scale rather than linear scale if you want to show both large and small values in the same graph.

Log scale option for left Y axis: