Does trendline support multi series of one query

  • What Grafana version and what operating system are you using?
    12.3.6

  • What are you trying to achieve? generate trendline for each series of one query.

  • How are you trying to achieve it? I configured 3 variables in one dashboard and use them in query A, then I add trendline transformation. X field → Time, Y field -->Value(base filed name), Model type → Linear

  • What happened? Only 1 trendline for 1 series genrated

  • What did you expect to happen? 1 trendline for each series of query A

  • Can you copy/paste the configuration(s) that you are having problems with? no error reported, just only generated 1 trendline of mult-series of query A

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. -->No.

  • Did you follow any online instructions? If so, what is the URL?Transform data | Grafana documentation

The Trendline transformation does not automatically support multi-series from a single query. It only generates a trendline for the one field you explicitly select in the Y field → regardless of how many series your query returns through variables
The solution of adding Partition by values before Trendline also fails with this error->Partition by values only works with a single frame

This is because your query with 3 variables returns 3 separate frames not one merged frame → so Partition by values not to be used here
Using Merge transformation is also not required . Even after merging, Grafana still does not automatically create separate trendlines per series so Add the Trendline transformation multiple times once per series
Trendline 1-> X = Time, Y = first-series-field, Model-> Linear
Trendline 2-> X = Time, Y = second-series-field, Model-> Linear
Trendline 3-> X = Time, Y = third-series-field, Model-> Linear
The Y field names will match your variable values → just open the Y field dropdown and you will see each series listed add one Trendline per series and you will get a regression line for each one

This is a current limitation of Grafana 12.3.6 → there is no single transformation solution. The multi Trendline approach is the only confirmed working workaround right now.

Thank you very much for your answer!

Based on the 3 variables, the query result return with different numbers of series after give different variable options . So there is no workaround for my case. Does future Grafana version able to support this scenario?