Hi
How can i show time chart by yield names?
I have couple of grafana queries that yield by different name like rate, count, mean ,…
How can i show graphs by yield name?
I try these but neither work.
${__field.name} , ${__field.yield.name} , ${__field.results} , ${__field.value}
Any idea?
thanks,
Not sure that it is currently possible this way. See related discussions / feature requests:
Hi all
I’m trying to work out a way to differentiate the results from different Flux queries when run as part of the same panel. Here’s the code:
import "date"
month = date.truncate(t: now(), unit: 1mo)
from(bucket: "Power")
|> range(start: month)
|> filter(fn: (r) => r["_measurement"] == "consumption")
|> filter(fn: (r) => r["_field"] == "value")
|> filter(fn: (r) => r["series"] == "House")
|> filter(fn: (r) => r["_value"] > 0)
|> sum()
|> map(fn: (r) => ({ r with _value: r._va…
opened 07:05PM - 17 Feb 24 UTC
type/feature-request
migrated-discussions
### Discussed in https://github.com/grafana/grafana/discussions/49546
<div ty… pe='discussions-op-text'>
<sup>Originally posted by **Joe-Influx** May 24, 2022</sup>
I am trying to reuse the same query in two Grafana panels:
One panel needs “all the data”, while the other panel needs only “a subset of the data” (the subset that could be easily identified by the “name” of one of the yield() in the query). I’m wondering if there is a way to let the second query only see the data from that yield().
The context is:
When running a query with InfluxDB and using “yield(name: <some_string>)“, the resulting CSV includes a “result” column that maps to that <some_string>.
When creating a dashboard panel in Grafana, it is possible to specify a Flux query (which might include some number of “yield()“) in the “Query” tab.
I need a functionality equivalent to the “Filter data by query” in the “Transform” tab of Grafana, to filter data based on the <some_string> of yield().
I was wondering if there can be a plugin or a workaround to use a Grafana Transform to select only the data returned by a yield() in the context of a larger query that might have returned more data.</div>
May be adding new columns to your flux queries with required name using map() or renaming columns using rename() would work as appropriate workarounds.