title: Calculate value in Group By statement
body: <p><strong>Use case:</strong></p>
  
  <p>I have 10 Kubernetes nodes (consider them as VMs) which have between 7 and 14 allocatable CPU cores which can be requested by Kubernetes pods. Therefore I'd like to show a table which shows the</p>
  
  <ol>
  <li>Allocatable CPU cores</li>
  <li>The requested CPU cores</li>
  <li>The ratio of requested / allocatable CPU cores</li>
  </ol>
  
  <p>grouped by node.</p>
  
  <p><strong>The problem</strong></p>
  
  <p>Creating the table for the first 2 requirements was easy. I simply created a table in Grafana and added these two metrics:</p>
  
  <pre><code>sum(kube_pod_container_resource_requests_cpu_cores) by (node)
  sum(kube_node_status_allocatable_cpu_cores) by (node)
  </code></pre>
  
  <p>However I was struggling with the third one. I tried this query, but it didn't return any data apparently:</p>
  
  <pre><code>sum(kube_pod_container_resource_requests_cpu_cores / kube_node_status_allocatable_cpu_cores) by (node)
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>How can I achieve a calculation of two different metrics in a group by statement in my given example?</p>