# Multiply values from INFLUXDB

**URL:** <https://community.grafana.com/t/multiply-values-from-influxdb/1329>\
**Category:** InfluxDB\
**Tags:** influxdb, query-help\
**Created:** [June 13, 2017, 2:16pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329 "2017-06-13T14:16:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hermann1514](https://avatars.discourse-cdn.com/v4/letter/h/b5e925/32.png) [@hermann1514](https://community.grafana.com/u/hermann1514)\
**Post date:** [June 13, 2017, 2:16pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329/1 "2017-06-13T14:16:55Z")

</div>

Hi,

how can I multiply two or more values ​​from an INFLUXDB?  
Is this possible with the GUI?  
Can one describe this to me?

Thank you.  
greeting  
Hermann

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [June 13, 2017, 6:33pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329/2 "2017-06-13T18:33:40Z")

</div>

If multiplying by a constant that use the Math operator:

 ![](https://us1.discourse-cdn.com/grafana/original/1X/c28c9e2ea8942090a00c0d057971a1015384db03.png)

If you need to multiply two fields then you will need to toggle to Edit Mode:

 ![](https://us1.discourse-cdn.com/grafana/original/1X/59fa88b2ac8bbfdd00755c3e3c2fdf8661479a4a.png)

or like this using the Math operator:

 ![](https://us1.discourse-cdn.com/grafana/original/1X/c380558e932a0c689d18fba11b28bc2a15e15194.png)

---

<div class="post-metadata">

**Author:** ![hermann1514](https://avatars.discourse-cdn.com/v4/letter/h/b5e925/32.png) [@hermann1514](https://community.grafana.com/u/hermann1514)\
**Post date:** [June 13, 2017, 6:54pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329/3 "2017-06-13T18:54:18Z")

</div>

Thanks. But if the values are from different Hosts?  
Is this possible too?

Thx.  
Regards  
Hermann

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [June 13, 2017, 6:55pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329/4 "2017-06-13T18:55:21Z")

</div>

What do you mean by different hosts?

---

<div class="post-metadata">

**Author:** ![hermann1514](https://avatars.discourse-cdn.com/v4/letter/h/b5e925/32.png) [@hermann1514](https://community.grafana.com/u/hermann1514)\
**Post date:** [June 13, 2017, 7:49pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329/5 "2017-06-13T19:49:36Z")

</div>

I have 6 Hosts. With Telegraf i Send the perfcounter to the influxdb. The perfcounter ist a value for loggedin Users.

I wish to add a Graph where all values are added together.

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [June 13, 2017, 8:51pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329/6 "2017-06-13T20:51:20Z")

</div>

Added or multiplied? Do you mean that you have one table with a perfcounter field and each host is a tag?

If you just want to sum (add) all the values then this is a standard InfluxDB query using the sum aggregation (this query is grouped by hostname, remove the tag(hostname) and alias by if you want a total without grouping):

 ![](https://us1.discourse-cdn.com/grafana/original/1X/5442991d3fc5be7c7a0136d8e89a57a4074981f9.png)

---

<div class="post-metadata">

**Author:** ![hermann1514](https://avatars.discourse-cdn.com/v4/letter/h/b5e925/32.png) [@hermann1514](https://community.grafana.com/u/hermann1514)\
**Post date:** [June 26, 2017, 2:04pm UTC](https://community.grafana.com/t/multiply-values-from-influxdb/1329/7 "2017-06-26T14:04:06Z")

</div>

Hi.

Great. Thanks It works.

Regards  
Hermann
