title: Charting the sum of two Prometheus data source values in Grafana
body: <p>I am trying to create a chart in Grafana with Prometheus data source which includes a series indicating the total size of the young gen memory used on a java 8 jvm.  Below is the formula I have used to sum the values together:</p>
  
  <pre><code>(jvm_memory_pool_bytes_used{job="jmx",instance=~"my-jboss-server:10191",pool="PS Eden Space"}
  + 
  jvm_memory_pool_bytes_used{job="jmx",instance=~"my-jboss-server:10191",pool="PS Survivor Space"})
  </code></pre>
  
  <p>I am able to chart the individual values for <code>PS Survivor Space</code> and <code>PS Eden Space</code> but as soon as I try to add them together, there is no data returned.</p>
  
  <p>Below is some sample data which is returned:</p>
  
  <pre><code>jvm_memory_pool_bytes_used{pool="PS Eden Space",} 5.83346368E8
  jvm_memory_pool_bytes_used{pool="PS Survivor Space",} 8.5090432E7
  </code></pre>