-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Divide result of one query by result of another query / CASE WHEN type functionality #5383
Comments
+1: I agree influx should support this this kind of functionality. Without it means storing data as booleans is a lot less useful than storing it as either 0 or 1 because you want to be able to do things like:
|
See #3552 |
For the The former The latter |
+1 |
is it implemented yet !! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
That would be a great feature to have. |
+1 |
Hi there
I realise this is probably trivial to do, but I've searched the docs / GitHub issues and could not find a solution.
I would like to divide the result of one query by the result of another. I am using Grafana on top of InfluxDB, and would like to establish how many rows of data are within a certain target range.
Essentially, dividing the result from the top query by the result from the bottom query:
An alternative would be something like the following in T-SQL:
SELECT sum(CASE WHEN value < 25 THEN 1 ELSE 0 END) / count(value) from "ui.thread_switch" where $timeFilter
Does such CASE WHEN type functionality exist in InfluxDB?
I feel like this should be possible but I'm not sure how. Please could someone point me in the right direction :)? That'd be much appreciated!
Thanks,
Gaurav
The text was updated successfully, but these errors were encountered: