GoshPosh / grafana-meta-queries

Grafana plugin for calculating time period metrics like week over week, month over month and year over year etc.
Apache License 2.0
284 stars 71 forks source link

Does MetaQueries work without aliases? #130

Closed CGavrila closed 3 years ago

CGavrila commented 3 years ago

Hello. 👋

I have two queries in a Mixed dashboard, one from BigQuery and one from Prometheus.

What I want to do is have the results divided using MetaQueries, such that I basically get query A / query B as a graph.

image

My best guess at this point is that A / B doesn't simply work, so I would need something like A['cost'] / B['sessions'], but that doesn't seem to work either.

Since I have no options of setting aliases for the queries (that I can see), how could I use MetaQueries in this scenario?

Gauravshah commented 3 years ago

whats your panel's datasource ?

CGavrila commented 3 years ago

@Gauravshah Thank you for your answer.

If you mean the C panel, then that should be a MetaQueries panel. I click on Add query on the top right, then select MetaQueries.

Gauravshah commented 3 years ago

can you take a full page screenshot and send it acroos ?

CGavrila commented 3 years ago

@Gauravshah Sure, this should be it.

image

Gauravshah commented 3 years ago

it says mixed at top. it should be meta-quereis

CGavrila commented 3 years ago

@Gauravshah You were absolutely correct. Thank you so much for your help, I tried for hours!

For anyone else struggling with this, my queries now look like this:

image