Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable as field name not working --> no data shown #25505

Closed
JsBergbau opened this issue Jun 10, 2020 · 6 comments
Closed

Variable as field name not working --> no data shown #25505

JsBergbau opened this issue Jun 10, 2020 · 6 comments

Comments

@JsBergbau
Copy link

What happened:
No data is shown

What you expected to happen:
Data is shown according to the selected variable

How to reproduce it (as minimally and precisely as possible):

  1. Create new dashboard
  2. Create variable like in this screen
    grafik
  3. Create a panel using the variable

You will see no data shown
grafik

When directly specifying the field name data is corretly shown

grafik

Anything else we need to know?:

Environment:

  • Grafana version: 7.0.3
  • Data source type & version: InfluxDB 1.8.0
  • OS Grafana is installed on:
  • User OS & Browser: Windows OS, Firefox and Chrome, same problems
  • Grafana plugins: shouldn't matter, but see screenshot below
  • Others:

grafik

@torkelo
Copy link
Member

torkelo commented Jun 10, 2020

since it's a single value variable you should not use the regex syntax for the variable (in the editor). just specify $fields (regex & multi value variable is not supported in field selector)

@torkelo
Copy link
Member

torkelo commented Jun 10, 2020

duplicate of #6754

@torkelo torkelo closed this as completed Jun 10, 2020
@JsBergbau
Copy link
Author

Hi @torkelo
Thanks for replying so fast.
Could you change the autocomplete that way that it suggests in this case $fields instead of the regex syntax?
So is there no option to use the all value to generate 2 diagrams or lets say 10 if there were 10 fields in the measurement?

@torkelo
Copy link
Member

torkelo commented Jun 10, 2020

yea, multiple values are not supported there (not sure InfluxQL supports it)

@JsBergbau
Copy link
Author

Thanks for the fast reply. So I have to create 20 diagrams (other table with much more fields). Hoped to avoid this.

Regarding InfluxQL: It would support multiple fields.

Original query
SELECT mean("TVOC") FROM "CCS811" WHERE time >= now() - 6h GROUP BY time(15s) fill(none)
modified/multiple fields query
SELECT mean("TVOC"), mean("eCO2") FROM "CCS811" WHERE time >= now() - 6h GROUP BY time(15s) fill(none)

@torkelo
Copy link
Member

torkelo commented Jun 10, 2020

but that expressed using variables as variables can just be interpolated so it would be mean("$variable") so any variable interpolation would not be able to produce mean("TVOC"), mean("eCO2")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants