Have you tried something like this?
[image] Answer from grant2 on community.grafana.com
Grafana
community.grafana.com › influxdb
Simple calculations with two or more metrics (sum, subtract, etc) with influxql/flux query? - InfluxDB - Grafana Labs Community Forums
January 11, 2022 - is it possible to sum two or more metrics with influxql (or may be with flux) rather than stacking graphs or executing an expressions on them ? For example - sum of two metrics: uplink and downlink traffic. I.e. it pos…
Grafana
community.grafana.com › dashboards
Display sum of all gauge's values - Dashboards - Grafana Labs Community Forums
May 31, 2023 - Hello, I’m very new to Grafana and Prometheus. I’m using Grafana v8.2.6 on Windows 10, along with Prometheus. It scrapes a Gauge metric that is sent every 2 minutes. I would like to display a stat that corresponds to …
Grafana
community.grafana.com › elasticsearch
Summing 2 series results to a single value - Elasticsearch - Grafana Labs Community Forums
April 27, 2021 - Hi I created a panel and 2 queries. Each query returns a single value. My goal is to display a single value, which is the sum of both values. Please advise. Thanks Shay
Grafana
community.grafana.com › dashboards
Sum multiple series with the same name - Dashboards - Grafana Labs Community Forums
September 1, 2025 - Grafana 11.4 with a Zabbix 7.2 data-source. A Grafana Stat panel queries Zabbix and returns multiple metrics from different hosts, each with similar series names. For example: Series 20 = 1 Series 20 = 2 Series 22 = 1 Series 22 = 3 Series 22 ...
Medium
medium.com › @bukharovsi › how-to-start-using-metrics-with-grafana-and-not-fail-part-2-3-bd64e353f9bc
How to start using metrics with Grafana and not fail. Part 2/3 | by Sergey Bukharov | Medium
July 22, 2019 - Be careful, applications do not send metric at the same moment. They have their own opinion on when to send it. And when Grafana shows it, the database should aggregate these 3 points to one. Again, the aggregate function depends on your purpose. If you would like to know how many users registered in the app, your query should be · SELECT sum(“count”) FROM “logins.count”….
InfluxData Community
community.influxdata.com › fluxlang
Aggregate "sum" from multiple series for Grafana graph panel - Fluxlang - InfluxData Community Forums
June 1, 2021 - My data I have a measurement that have the total memory of each VM on each host in megabytes (granularity of 30s). The memory of the VMs can be changed and also the host of the VMs can also be changed. For example; I have two nodes and 4 VMs: _time, host, vm, _value 2021-06-01 10:41:00 GMT+2, FPPW9406, VM01, 4096 2021-06-01 10:41:00 GMT+2, FPPW9406, VM02, 1024 2021-06-01 10:41:00 GMT+2, FPPW9407, VM03, 4096 2021-06-01 10:41:00 GMT+2, FPPW9407, VM04, 1024 2021-06-01 10:40:30 GMT+2, FPPW94...
Rolf-engelhard
rolf-engelhard.de › 2022 › 12 › combine-multiple-metrics-into-a-single-stat-in-grafana
Combine multiple metrics into a single Stat in Grafana | Rolf Engelhard
After creating the queries we reduce all of them to a single, new value by simply calculating the sum of the other queries’ outcome. We’re naming this new value “state” (because we’re not having enough ambiguity by now :-). The “Time” field has to be excluded. A “reduce now” transform entry combines every query into a single, new value. Now multiplying a factor to every query comes into play. If the circuit breaker is in a certain state, the according metric will change to 1 (while all others remain 0).
Stack Overflow
stackoverflow.com › questions › 78937272 › sum-metric-values-over-a-given-time-but-only-if-another-metric-is-above-a-certa
grafana - Sum metric values over a given time, but only if another metric is above a certain threshold - Stack Overflow
sum_over_time( ( homeassistant_sensor_power_w{entity="sensor.sonoff_1001691285_power"} and on (instance) (homeassistant_sensor_power_w{entity="sensor.sunsynk_grid_power"} > 20) )[24h:1m] ) Note that you need adjusting the duration after the colon in square brackets according to the interval between samples stored in Prometheus (aka scrape_interval). Also, it looks like the homeassistant_sensor_power_w metric measures the power in Watts.
Grafana
community.grafana.com › grafana loki
LOKI - sum of metric values in log lines - Grafana Loki - Grafana Labs Community Forums
March 25, 2024 - I have following log : at=2024-03-25T21:40:48Z name=“Jeffry Deckow” has_account=false total_amount=33.27 event=“New customer order.” at=2024-03-25T21:40:49Z name=“Laron Brakus” has_account=false total_amount=134.43 event=“New customer order.” Is it possible to write query to sum total_amount, for example for 21 (9PM) I would like to sum(33.27, 134,43) to have value 167,7. I know that I can count number of line, rate etc.
Grafana
community.grafana.com › prometheus
Sum values grup by instance - Prometheus - Grafana Labs Community Forums
March 16, 2022 - One of this is reporting the sum of all instances calculating the percent as follow: sum(purefa_array_space_used_bytes)/sum(purefa_array_space_capacity_bytes) It reports the total percent of the used space of all systems, one single value Due the ...